开发者社区> 问答> 正文

打开域名主页是Welcome to nginx



打开域名主页是Welcome to nginx!


请问怎么设置到阿里云默认程序phpwind 安装界面





展开
收起
木匠 2016-01-25 08:08:03 11145 0
2 条回答
写回答
取消 提交回答
  • 回 1楼西秦的帖子
    阿里云一键安装包有Phpwind,我只是设置域名304就变成Welcome to nginx!

    -------------------------

    Re打开域名主页是Welcome to nginx
    取消304,打开域名就可以到安装界面

    -------------------------

    Re打开域名主页是Welcome to nginx
    好的,麻烦帮忙看看

    -------------------------

    回 4楼西秦的帖子
    nginx.conf


    user  www www;
    worker_processes  1;

    error_log  /alidata/log/nginx/error.log crit;
    pid        /alidata/server/nginx/logs/nginx.pid;

    #Specifies the value for maximum file descriptors that can be opened by this process.  
    worker_rlimit_nofile 65535;

    events  
    {
      use epoll;
      worker_connections 65535;
    }


    http {
        include       mime.types;
        default_type  application/octet-stream;

        #charset  gb2312;

        server_names_hash_bucket_size 128;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 8m;

        sendfile on;
        tcp_nopush     on;

        keepalive_timeout 60;

        tcp_nodelay on;

        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size 64k;
        fastcgi_buffers 4 64k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_write_size 128k;

        gzip on;
        gzip_min_length  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.0;
        gzip_comp_level 2;
        gzip_types       text/plain application/x-javascript text/css application/xml;
        gzip_vary on;
        #limit_zone  crawler  $binary_remote_addr  10m;
        log_format '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
        include /alidata/server/nginx/conf/vhosts/*.conf;

    -------------------------

    回 7楼西秦的帖子
    phpwind.conf

    server {
          server_name  www.etongwang.com etongwang.com;
          location /phpwind/
    {    
    root /www/phpwind/html/;
    }
          if ($host != 'www.etongwang.com' ) {
         rewrite ^/(.*)$ http://www.etongwang.com/$1 permanent;
          }}
    红色是我后添加的,删掉重启nginx 就可以打开到网站安装程序界面PHPWIND




    server {
            listen       80;
            server_name  localhost;
        index index.html index.htm index.php;
        root /alidata/www/phpwind;
        location ~ .*\.(php|php5)?$
        {
            #fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
            expires 1h;
        }
        #伪静态规则
        include /alidata/server/nginx/conf/rewrite/phpwind.conf;
        access_log  /alidata/log/nginx/access/phpwind.log;
    }

    -------------------------

    Re打开域名主页是Welcome to nginx
    default.conf.bak

    server {
            listen       80;
            server_name  localhost;
        index index.html index.htm index.php;
        root /alidata/www/default;
        location ~ .*\.(php|php5)?$
        {
            #fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
            expires 1h;
        }
        #伪静态规则
        include /alidata/server/nginx/conf/rewrite/default.conf;
        access_log  /alidata/log/nginx/access/default.log;

    -------------------------

    回 10楼西秦的帖子
    nginx.conf.default

    在这个文件修改吗,具体点说明好吗

    #user  nobody;
    worker_processes  1;

    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;

    #pid        logs/nginx.pid;


    events {
        worker_connections  1024;
    }


    http {
        include       mime.types;
        default_type  application/octet-stream;

        #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        #                  '$status $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';

        #access_log  logs/access.log  main;

        sendfile        on;
        #tcp_nopush     on;

        #keepalive_timeout  0;
        keepalive_timeout  65;

        #gzip  on;

        server {
            listen       80;
            server_name  localhost;

            #charset koi8-r;

            #access_log  logs/host.access.log  main;

            location / {
                root   html;
                index  index.html index.htm;
            }

            #error_page  404              /404.html;

            # redirect server error pages to the static page /50x.html
            #
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }

            # proxy the PHP scripts to Apache listening on 127.0.0.1:80
            #
            #location ~ \.php$ {
            #    proxy_pass   http://127.0.0.1;
            #}

            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            #location ~ \.php$ {
            #    root           html;
            #    fastcgi_pass   127.0.0.1:9000;
            #    fastcgi_index  index.php;
            #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            #    include        fastcgi_params;
            #}

            # deny access to .htaccess files, if Apache's document root
            # concurs with nginx's one
            #
            #location ~ /\.ht {
            #    deny  all;
            #}
        }


        # another virtual host using mix of IP-, name-, and port-based configuration
        #
        #server {
        #    listen       8000;
        #    listen       somename:8080;
        #    server_name  somename  alias  another.alias;

        #    location / {
        #        root   html;
        #        index  index.html index.htm;
        #    }
        #}


        # HTTPS server
        #
        #server {
        #    listen       443;
        #    server_name  localhost;

        #    ssl                  on;
        #    ssl_certificate      cert.pem;
        #    ssl_certificate_key  cert.key;

        #    ssl_session_timeout  5m;

        #    ssl_protocols  SSLv2 SSLv3 TLSv1;
        #    ssl_ciphers  HIGH:!aNULL:!MD5;
        #    ssl_prefer_server_ciphers   on;

        #    location / {
        #        root   html;
        #        index  index.html index.htm;
        #    }
        #}

    }

    -------------------------

    回 12楼西秦的帖子
    好的,我试试
    2016-01-25 10:47:57
    赞同 展开评论 打赏
  • 码农|Coder| Pythonista
    需您配置nginx的环境。建议您使用镜像市场中集成Phpwind的镜像

    -------------------------

    回 3楼(木匠) 的帖子
    建议您将配置文件贴出来,帮您看看

    -------------------------

    include /alidata/server/nginx/conf/vhosts/*.conf;
    这里的配置文件可以提供一下么?

    -------------------------

    您好。您自己的配置没有设置默认主页和PHP解析,所以需要修改配置项

    -------------------------

    server {
          server_name  www.etongwang.com etongwang.com;
          location /phpwind/  
    {      
    root /www/phpwind/html/;
    }
          if ($host != 'www.etongwang.com' ) {
         rewrite ^/(.*)$ http://www.etongwang.com/$1 permanent;
          }}  
    里加入
        root /alidata/www/default;
        location ~ .*\.(php|php5)?$
        {
            #fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }
    路径根据需求修改

    2016-01-25 09:44:57
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
看域名行业如何变身“八爪鱼” 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载