nginx_ssl
This is an old revision of the document!
You will need two server blocks for this:
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 |
server { listen 80; server_name www.example.co.uk example.co.uk; return 301 https: //example .co.uk$request_uri; #note: this line actually forces https, you may not wish to have this, in which case you will just remove the line or comment it out } server{ listen 443; server_name example.co.uk www.example.co.uk; root /var/www/vhosts/example .co.uk; index index.html index.htm index.php; access_log /var/log/nginx/example .co.uk.access.log; error_log /var/log/nginx/example .co.uk.access.log; ssl on; ssl_certificate /etc/httpd/conf/ssl/ssl .crt /example .co.uk.crt; ssl_certificate_key /etc/httpd/conf/ssl/ssl .key /example .co.uk.key; location / { rewrite ^ /_media/ (.*) /lib/exe/fetch .php?media=$1 last; rewrite ^ /_detail/ (.*) /lib/exe/detail .php?media=$1 last; rewrite ^ /_export/ ([^/]+)/(.*) /doku .php? do =export_$1& id =$2 last; rewrite ^/(?!lib/)(.*) /doku .php? id =$1&$args last; } location ~ \.php$ { include /etc/nginx/fastcgi_params ; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/vhosts/example .co.uk$fastcgi_script_name; } } |
nginx_ssl.1428329074.txt.gz · Last modified: 2024/05/23 07:26 (external edit)