Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- root /data/example.com/www;
- index index.php index.html index.htm;
- autoindex off;
- location = /rewrite.php {
- rewrite ^(.*)$ /installation/tests/apache_rewrite.php break;
- }
- location /action {
- rewrite ^/action\/([A-Za-z0-9\_\-\/]+)$ /system/handlers/actions.php?action=$1&$query_string break;
- }
- location / {
- if (!-e $request_filename){
- rewrite ^/([A-Za-z0-9\_\-]+)$ /index.php?h=$1 break;
- }
- if (!-e $request_filename){
- rewrite ^/([A-Za-z0-9\_\-]+)\/(.*)$ /index.php?h=$1&p=$2 break;
- }
- }
- location /error_log {
- deny all;
- }
- location ~ (nginx|htaccess).dist {
- deny all;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
- server {
- listen 443 ssl default_server;
- listen [::]:443 ssl default_server;
- server_tokens off;
- server_name example.com www.example.com;
- root /data/example.com/www;
- index index.php index.html index.htm;
- ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement