Created
June 17, 2015 10:38
-
-
Save runcom/62ad7beec43e27aab498 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 _; | |
| default_type text/html; | |
| location = /ping.php { | |
| return 200; | |
| } | |
| } | |
| server { | |
| listen 81; | |
| server_name _; | |
| return 301 https://prima.it$request_uri; | |
| } | |
| server { | |
| server_name prima.it; | |
| root /app/web; | |
| listen 80; | |
| error_log /var/log/nginx/prima_error.log; | |
| access_log /var/log/nginx/prima_access.log; | |
| location / { | |
| index app.php; | |
| # prova a servire direttamente i file, fallback su riscrittura | |
| try_files $uri @rewrite; | |
| } | |
| location @rewrite { | |
| # riscrittura di tutto su app_staging.php | |
| rewrite ^(.*)$ /app.php/$1 last; | |
| } | |
| location ~ ^/(app)\.php(/|$) { | |
| fastcgi_pass php:9000; | |
| fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_param HTTPS off; | |
| # Variables | |
| fastcgi_param SYMFONY__PRIMA__GIT__REVISION 'cbc49134b1e9e85'; | |
| auth_basic "Prima.it"; | |
| auth_basic_user_file /opt/htpasswd/htpasswd; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| } | |
| # Qualsiasi cosa che non è un dominio nostro si incazza | |
| server { | |
| return 404; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment