Created
January 12, 2017 21:55
-
-
Save andres-asm/8ea0a48a63b4bbd0db8a900ce41e8903 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
| #AUTOMATICALLY GENERATED - DO NO EDIT! | |
| server { | |
| listen *:80; | |
| server_name dev.protrauma.com.ec; | |
| access_log /var/log/nginx/web-protrauma.access.log; | |
| error_log /var/log/nginx/web-protrauma.error.log; | |
| root /srv/usr_protrauma/web/html; | |
| index index.html index.htm index.php; | |
| location = /favicon.ico { | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location = /robots.txt { | |
| allow all; | |
| log_not_found off; | |
| access_log off; | |
| } | |
| # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac). | |
| location ~ /\. { | |
| deny all; | |
| access_log off; | |
| log_not_found off; | |
| } | |
| location ~ /\.(js|css)$ { | |
| expires 604800s; | |
| } | |
| if (!-e $request_filename){ | |
| rewrite ^/(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ /$1.$3 last; | |
| } | |
| location ~* ^/fileadmin/(.*/)?_recycler_/ { | |
| deny all; | |
| } | |
| location ~* ^/fileadmin/templates/.*(\.txt|\.ts)$ { | |
| deny all; | |
| } | |
| location ~* ^/typo3conf/ext/[^/]+/Resources/Private/ { | |
| deny all; | |
| } | |
| location ~* ^/(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) { | |
| } | |
| location / { | |
| if ($query_string ~ ".+") { | |
| return 405; | |
| } | |
| if ($http_cookie ~ 'nc_staticfilecache|be_typo_user|fe_typo_user' ) { | |
| return 405; | |
| } # pass POST requests to PHP | |
| if ($request_method !~ ^(GET|HEAD)$ ) { | |
| return 405; | |
| } | |
| if ($http_pragma = 'no-cache') { | |
| return 405; | |
| } | |
| if ($http_cache_control = 'no-cache') { | |
| return 405; | |
| } | |
| error_page 405 = @nocache; | |
| try_files /typo3temp/tx_ncstaticfilecache/$host${request_uri}index.html @nocache; | |
| } | |
| location @nocache { | |
| try_files $uri $uri/ /index.php$is_args$args; | |
| } | |
| location ~ [^/]\.php(/|$) { | |
| try_files $uri =404; | |
| fastcgi_intercept_errors on; | |
| fastcgi_buffer_size 128k; | |
| fastcgi_buffers 256 16k; | |
| fastcgi_busy_buffers_size 256k; | |
| fastcgi_temp_file_write_size 256k; | |
| fastcgi_read_timeout 1200; | |
| fastcgi_index index.php; | |
| include fcgi.conf; | |
| fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-web-protrauma-php-fcgi-0.sock; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment