EasyEngine Proper Conf Location to for Custom SSL & Rewrite config


#1

Hello,

I wanted to ask where is the proper location to put the nginx conf for a sites custom SSL config and site specific rewrite rules? I see the /etc/nginx/sites-available/domain.com and the /var/www/domain.com/conf/nginx options, but I wasnt sure what was recommended as I do not want the config to get overwritten with updates.

Also I wanted to ask specifically about how to implement Opencart’s rewrite config. My old nginx conf that works on a non easyengine setup seems to be incompatable due to duplicating multiple locations that would be used in default easyengine confs. This is what works without EE:

location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=feed/google_sitemap break; }

location = /googlebase.xml { rewrite ^(.*)$ /index.php?route=feed/google_base break; }

location ~ .(ico|gif|jpg|jpeg|png|js|css)$ { try_files $uri =404; }

location / { # This try_files directive is used to enable SEO-friendly URLs for OpenCart try_files $uri $uri/ @opencart; }

location @opencart { rewrite ^/(.+)$ /index.php?route=$1 last; }


#2

Is their any recommended spot that is safe to put a sites nginx conf? I do not see a help article or any forum questions specific to this so if anyone can point me in the right direction.

Thanks.


#3

Maybe I am asking the question poorly… Where do you guys put any custom nginx conf for a easyengine site?


#4

/var/www/domain.com/conf/nginx/


#5