forked from exponentcms/exponent-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginix.conf
37 lines (31 loc) · 1.33 KB
/
nginix.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# NGINX Sample Configuration for Exponent CMS
# this is NOT a complete configuration file
# and should be placed within the /etc/nginx/conf/sites-enabled folder (or similar)
# this file is typically included from main nginx.conf file
server {
listen 80;
listen [::]:80;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name mydomain.net;
ssl on;
ssl_certificate www.example.com.crt;
ssl_certificate_key www.example.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:!MD5;
ssl_prefer_server_ciphers on;
root /var/www/example/public_html;
index index.php;
access_log /var/log/nginx/mydomain.access.log;
error_log /var/log/nginx/mydomain.error.log;
# To force the domain to serve the site securely using HTTPS,
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
# Support for Search Engine Friendly URLs
location / {
try_files $uri $uri/ /index.php?$args;
}
# Alternative Support for Search Engine Friendly URLs from a web subfolder
location /subfolder/ {
try_files $uri $uri/ /subfolder/index.php?$args;
}ls
}