Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name mydomain.com;
- rewrite ^ $scheme://www.mydomain.com$request_uri permanent;
- }
- server {
- listen 80;
- server_name images.mydomain.com;
- root /var/www/templates/mydomain.com/assets/images;
- }
- server {
- listen 80;
- server_name styles.mydomain.com;
- root /var/www/templates/mydomain.com/assets/styles;
- }
- server {
- listen 80;
- server_name scripts.mydomain.com;
- root /var/www/templates/mydomain.com/assets/scripts;
- }
- server {
- listen 80;
- server_name media.mydomain.com;
- root /var/www/media;
- }
- server {
- listen 80;
- server_name www.mydomain.com;
- root /var/www/public_html;
- error_page 404 $scheme://www.mydomain.com/not_found;
- index index.php index.html;
- include shared_rewrite_rules;
- # use fastcgi for all php files
- location ~ \.php$
- {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- }
- server {
- listen 443 ssl;
- server_name www.mydomain.com;
- root /var/www/public_html;
- index index.php index.html;
- include shared_rewrite_rules;
- keepalive_timeout 70;
- ssl_session_timeout 5m;
- ssl_certificate_key /etc/nginx/ssl/mydomain.com/mydomain.com.key;
- ssl_certificate /etc/nginx/ssl/mydomain.com/mydomain.com.crt;
- # use fastcgi for all php files
- location ~ \.php$
- {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param HTTPS on;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement