nginx couple of issues (bug?) and Magento configuration

1 post / 0 new
#1 Sat, 07/16/2016 - 05:26
srmobile

nginx couple of issues (bug?) and Magento configuration

Okay so I decided I wanted to give nginx a try on a clone of my Magento website, more than anything to satisfy my curiosity. I followed the instructions on the virtualmin website: https://www.virtualmin.com/documentation/web/nginx everything went well.

Problem 1: I can start and stop the nginx service from a shell, but in virtualmin I get "Failed to start Nginx : sh: /etc/init.d/nginx: No such file or directory " When I start the service manually, then go into virtualmin and press "Apply Nginx Configuration, same error: "Failed to apply Nginx configuration : sh: /etc/init.d/nginx: No such file or directory "

I tried a suggested configuration from nginx.com: https://www.nginx.com/resources/wiki/start/topics/examples/redhatnginxinit/ but it wont allow me to stop, start, restart the service (access denied) and I removed the file immediately.

Problem 2: I got the site running, but every time I click on a link, it says the page cannot be displayed. Probably because .htaccess is no longer used. I came across this for configuring Magento and Nginx: https://www.rosehosting.com/blog/install-magento-on-a-centos-7-vps-with-...

Now purely looking at the Magento portion of Nginx, it wants me to create a config file in nano /etc/nginx/conf.d/magentodomain.conf but when I did this, I couldn't start the service. I noticed that virtualmin includes the virtual site information, but dont know how to integrate or if its safe to remove from nginx.conf and put it in magentodomain.conf as the article suggests?

Any thoughts or suggestions, I would really like to give this a try :)

Thanks!

SR

EDIT: Okay so I went a head and removed the configuration information for my website in nginx.conf, created a mysite.conf and put in the information from the default file, restarted service and it worked! Went line by line for the suggested configuration of magento and found some conflicting configuration and now thats working too.

So for problem 2, I'm good and will leave this for others, but I'm still scratching my head on problem 1 :)