| Server IP : 127.0.0.1 / Your IP : 216.73.216.48 Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64 User : win 10 ( 0) PHP Version : 8.2.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/Desktop/setup/upstream-issue-17/ |
Upload File : |
# from https://github.com/fatiherikli/nginxparser/issues/17
server {
listen 443 ssl;
server_name prod.example.com example.com stage.example.com;
ssl_certificate ssl.crt/example.com.crt;
ssl_certificate_key ssl.key/example.com.key;
keepalive_timeout 5;
access_log /var/log/nginx/example.access.log;
error_log /var/log/nginx/example.error.log;
root /var/www/example/cs/current;
client_max_body_size 20M;
location / {
try_files $uri $uri/index.html @cs_shared;
}
location /images {
expires 30d;
}
location /scripts {
expires 30d;
}
location /styles {
expires 30d;
}
location @cs_shared {
root /var/www/example/cs/shared/public;
try_files $uri $uri/index.html @ss;
}
location @ss {
root /var/www/example/ss/current/public;
try_files $uri @index;
}
location @index {
root /var/www/example/cs/current;
rewrite ^ /index.html break;
}
location @rails {
proxy_pass http://example-ror;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Request-Start "t=${msec}";
proxy_redirect off;
proxy_read_timeout 300;
proxy_buffer_size 16k;
proxy_buffers 32 16k;
}
location ~* ^/(api|assets|system|rich|admin) {
root /var/www/example/ss/current/public;
try_files $uri @rails;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /var/www/example/cs/current;
}
error_page 405 =200 $uri;
}