Last active
December 22, 2019 14:28
-
-
Save diproart/44f22499fabc2b5449a6 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
| # modx evolution | |
| # @version 1.0.0 | |
| server { | |
| set $domain mysite.com; | |
| set $id user; | |
| listen 80; | |
| server_name $domain; | |
| root /home/$id/projects/$domain/www; | |
| index index.php index.html; | |
| charset utf-8; | |
| source_charset utf-8; | |
| client_max_body_size 1024M; | |
| client_body_buffer_size 4M; | |
| add_header X-Content-Type-Options nosniff; | |
| add_header X-XSS-Protection "1; mode=block;"; | |
| location = /favicon.ico { | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location = /robots.txt { | |
| allow all; | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location / { | |
| autoindex on; | |
| index index.php index.html; | |
| root /home/$id/projects/$domain/www; | |
| if (!-e $request_filename){ | |
| rewrite ^/(.*)$ /index.php?q=$1 last; | |
| } | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| #try_files $uri $uri/ = 404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include fastcgi_params; | |
| fastcgi_param SERVER_NAME $host; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment