server { listen 80; ## listen for ipv4 listen [::]:80; ## listen for ipv6 listen 443 ssl; listen [::]:443 ipv6only=on ssl; ssl_certificate /etc/ssl/certs/www.hostmauritius.com.pem; ssl_certificate_key /etc/ssl/private/www.hostmauritius.com.key; server_name www.hostmauritius.com hostmauritius.com; root /var/www/www.hostmauritius.com/web; if ($http_host != "www.hostmauritius.com") { rewrite ^ $scheme://www.hostmauritius.com$request_uri permanent; } location / { index index.php index.html index.htm; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; include fastcgi_params; } location ~ /\. { deny all; } }
SSL Vhost Configuration
Categories: