本地打不开 http://appfront.fecshoptest.com/install

问题咨询 · penny · 于 3年前 发布 · 1220 次阅读

localhost:8080 可以正常访问,本地hosts做了映射,访问不了appfront.fecshoptest.com/install 这个地址 502 Nginx 502 下面是nginx.conf 配置文件 位置位于 /usr/local/etc/nginx

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;
include /usr/local/etc/nginx/myconf/*.conf;
server {
    listen       8080;
    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;
    #}
}

server {
listen       80;
server_name  appfront.fecshoptest.com;
root  /www/web/develop/fecshop/appfront/web;
server_tokens off;
index index.php index.html index.htm;
location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    include fcgi.conf;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
    rewrite ^(.*.php)/ $1 last;
}
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php/$1 last;
    }
}
location /fr/ {
    index index.php;
    if (!-e $request_filename){
        rewrite . /fr/index.php last;
    }
}
location /cn/ {
    index index.php;
    if (!-e $request_filename){
        rewrite . /cn/index.php last;
    }
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires      30d;
}
location ~ .*\.(js|css)?$ {
    expires      12h;
}

}

server {

listen     80  ;
server_name apphtml5.fecshoptest.com;
root  /www/web/develop/fecshop/apphtml5/web;
server_tokens off;
index index.php index.html index.htm;
location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    include fcgi.conf;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
    rewrite ^(.*.php)/ $1 last;
}
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php/$1 last;
    }
}
location /fr/ {
    index index.php;
    if (!-e $request_filename){
        rewrite . /fr/index.php last;
    }
}
location /cn/ {
    index index.php;
    if (!-e $request_filename){
        rewrite . /cn/index.php last;
    }
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires      30d;
}
location ~ .*\.(js|css)?$ {
    expires      12h;
}

}

server {

listen     80  ;
server_name img.fecshoptest.com;
root  /www/web/develop/fecshop/appimage/common;
server_tokens off;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires      30d;
}

}

server {

listen     80  ;
server_name appserver.fecshoptest.com;
root  /www/web/develop/fecshop/appserver/web;
server_tokens off;
index index.php index.html index.htm;
location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    include fcgi.conf;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
    rewrite ^(.*.php)/ $1 last;
}
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php/$1 last;
    }
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires      30d;
}
location ~ .*\.(js|css)?$ {
    expires      12h;
}  

}

server {

listen     80  ;
server_name appadmin.fecshoptest.com;
root  /www/web/develop/fecshop/appadmin/web;
server_tokens off;
index index.php index.html index.htm;
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php/$1 last;
    }
}
location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    include fcgi.conf;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
    rewrite ^(.*.php)/ $1 last;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires      30d;
}
location ~ .*\.(js|css)?$ {
    expires      12h;
}

}

server {

listen     80  ;
server_name appapi.fecshoptest.com;
root  /www/web/develop/fecshop/appapi/web;
server_tokens off;
index index.php index.html index.htm;
location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    include fcgi.conf;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
    rewrite ^(.*.php)/ $1 last;
}
location / {
    if (!-e $request_filename){
        rewrite ^/(.*)$ /index.php/$1 last;
    }
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires      30d;
}
location ~ .*\.(js|css)?$ {
    expires      12h;
}

}

# 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 ssl;
#    server_name  localhost;

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

#    ssl_session_cache    shared:SSL:1m;
#    ssl_session_timeout  5m;

#    ssl_ciphers  HIGH:!aNULL:!MD5;
#    ssl_prefer_server_ciphers  on;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}
include servers/*;

}

/etc/hosts 内容如下:

Host Database

localhost is used to configure the loopback interface

when the system is booting. Do not change this entry.

127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost

Added by Docker Desktop

To allow the same kube context to work on the host and the container:

127.0.0.1 kubernetes.docker.internal

End of section

127.0.0.1 www.fecshoptest.com 127.0.0.1 appadmin.fecshoptest.com 127.0.0.1 img.fecshoptest.com 127.0.0.1 m.fecshoptest.com 127.0.0.1 appserver.fecshoptest.com 127.0.0.1 appapi.fecshoptest.com 127.0.0.1 appbdmin.fecshoptest.com 127.0.0.1 appfront.fecshoptest.com

共收到 1 条回复
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics