Created
August 31, 2016 09:03
-
-
Save jannejava/3b9fd2750b32a4a3358c3a70b4431f90 to your computer and use it in GitHub Desktop.
Sendy Forge Nginx Config file
This file contains 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
# FORGE CONFIG (DOT NOT REMOVE!) | |
include forge-conf/mydomain.com/before/*; | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name mydomain.com; | |
root /home/forge/mydomain.com/; | |
# FORGE SSL (DO NOT REMOVE!) | |
ssl_certificate /etc/nginx/ssl/mydomain.com/123456/server.crt; | |
ssl_certificate_key /etc/nginx/ssl/mydomain.com/123456/server.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers 'XXXXXX'; | |
ssl_prefer_server_ciphers on; | |
ssl_dhparam /etc/nginx/dhparams.pem; | |
index index.html index.htm index.php; | |
charset utf-8; | |
# FORGE CONFIG (DOT NOT REMOVE!) | |
include forge-conf/mydomain.com/server/*; | |
location / { | |
try_files $uri $uri/ $uri.php?$args; | |
} | |
location /l/ { | |
rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last; | |
} | |
location /t/ { | |
rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last; | |
} | |
location /w/ { | |
rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last; | |
} | |
location /unsubscribe/ { | |
rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last; | |
} | |
location /subscribe/ { | |
rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
access_log off; | |
error_log /var/log/nginx/mydomain.com-error.log error; | |
error_page 404 /index.php; | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} | |
# FORGE CONFIG (DOT NOT REMOVE!) | |
include forge-conf/mydomain.com/after/*; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment