Last active
September 7, 2021 15:13
-
-
Save Ghostscypher/ccb9eb37e81c7993e3240187bd8ff9b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name example.com; | |
# App root path here | |
root /srv/example.com/public; | |
# For ssl support add correct path here | |
#ssl_certificate /path/to/www.example.com.cert; | |
#ssl_certificate_key /path/to/www.example.com.key; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-Content-Type-Options "nosniff"; | |
index index.php; | |
charset utf-8; | |
# Our configuration starts here | |
location /app/ { | |
proxy_pass http://127.0.0.1:6000/app/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
proxy_set_header Host $host; | |
} | |
location /apps/ { | |
proxy_pass http://127.0.0.1:6000/apps/; | |
proxy_set_header Host $host; | |
} | |
# Our config ends here | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
error_page 404 /index.php; | |
location ~ \.php$ { | |
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ /\.(?!well-known).* { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment