Last active
November 2, 2016 13:49
-
-
Save andkirby/64f85b3c0e2614f5958a to your computer and use it in GitHub Desktop.
mob nginx config
This file contains hidden or 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
server { | |
listen 80; | |
listen 443 ssl; | |
ssl_certificate /etc/pki/tls/certs/www.m.com_2015-06-18.crt; | |
ssl_certificate_key /etc/pki/tls/private/www.m.com_2015-06-18.key; | |
ssl_session_timeout 7m; | |
## Specify your SSL options here | |
ssl_protocols SSLv2 SSLv3 TLSv1; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; | |
ssl_prefer_server_ciphers on; | |
access_log /var/log/nginx/magento.local-access.log; | |
error_log /var/log/nginx/magento.local-error.log; | |
server_name www.m.com m.com; | |
root /srv/www/current; | |
include conf/magento_rewrites.conf; | |
include conf/magento_security.conf; | |
# PHP handler | |
location ~ \.php { | |
## Catch 404s that try_files miss | |
if (!-e $request_filename) { rewrite / /index.php last; } | |
## Store code is defined in administration > Configuration > Manage Stores | |
fastcgi_param MAGE_RUN_CODE default; | |
fastcgi_param MAGE_RUN_TYPE store; | |
# By default, only handle fcgi without caching | |
include conf/magento_fcgi.conf; | |
} | |
# 404s are handled by front controller | |
location @magefc { | |
rewrite / /index.php; | |
} | |
# Last path match hands to magento or sets global cache-control | |
location / { | |
## Maintenance page overrides front controller | |
index index.html index.php; | |
try_files $uri $uri/ @magefc; | |
expires 24h; | |
} | |
# Enable caching font files by default | |
location ~ \.(ttf|woff|eot) { | |
add_header Cache-Control public; | |
add_header Access-Control-Allow-Origin *; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment