Created
December 5, 2015 06:24
-
-
Save muhafazakar/134c39b79fc5720eedbd to your computer and use it in GitHub Desktop.
NGINX virtual server example - NGINX virtüel sucunu örnegi
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 ornek.de www.ornek.de; | |
| access_log /srv/www/logs/ornek.de/access.log; | |
| error_log /srv/www/logs/ornek.de/error.log; | |
| root /usr/local/nginx/html/ornek.de; | |
| location / { | |
| if ($request_method !~ ^(GET|HEAD|POST)$ ){ | |
| return 444; | |
| } | |
| index index.php index.html index.htm; | |
| try_files $uri $uri/ =404; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| if ($request_method !~ ^(GET|HEAD|POST)$ ) | |
| { | |
| return 444; | |
| } | |
| if (!-f $request_filename) { | |
| return 404; | |
| } | |
| include /usr/local/nginx/conf/fastcgi_params; | |
| fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
| fastcgi_buffer_size 128k; | |
| fastcgi_buffers 256 16k; | |
| fastcgi_busy_buffers_size 256k; | |
| fastcgi_temp_file_write_size 256k; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment