Commit 6b142f2e authored by Kunkka王辉's avatar Kunkka王辉 😲

解决nginx try file的问题

parent 9fc28fb6
...@@ -50,6 +50,7 @@ location / { ...@@ -50,6 +50,7 @@ location / {
fastcgi_ignore_client_abort on; fastcgi_ignore_client_abort on;
try_files \$uri \$uri/ /index.php?\$query_string; try_files \$uri \$uri/ /index.php?\$query_string;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
location = /50x.html { location = /50x.html {
root /usr/share/nginx/html; root /usr/share/nginx/html;
...@@ -118,7 +119,7 @@ server { ...@@ -118,7 +119,7 @@ server {
{ {
return 404; return 404;
} }
location /{ location / {
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"; add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
...@@ -166,7 +167,7 @@ server { ...@@ -166,7 +167,7 @@ server {
{ {
return 404; return 404;
} }
location /{ location / {
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"; add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
...@@ -394,6 +395,13 @@ server { ...@@ -394,6 +395,13 @@ server {
location ^~ /presale/ { location ^~ /presale/ {
proxy_pass http://$HOST:$GALAXY_PRESALE_MICROS_API_HTTP_PORT; proxy_pass http://$HOST:$GALAXY_PRESALE_MICROS_API_HTTP_PORT;
} }
#REWRITE-END
location /{
# add_header Access-Control-Allow-Origin *;
# add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
# add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
try_files \$uri \$uri/ /index.html;
}
} }
EOF EOF
# presale-micros # presale-micros
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment