Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Opencart SEO with Nginx + PHP-FPM 404 Error

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
magzen
Posts: 47
Joined: Sat Sep 05, 2015 6:16 pm

Opencart SEO with Nginx + PHP-FPM 404 Error
  • Quote

Post by magzen » Sat Jan 30, 2016 9:42 pm

Hello,

I reinstalled a fresh server with vestacp using the configuration "NGinx + PHP-FPM"

My website does want to show up, i read on different places that the problem could be because of using SEO in Opencart and that can make an issue, in short website doesnt want to show up, can anyone using Opencart with SEO please help with this?

would appreciate any help asap since all my websites are down not good for customers that have made an order.

Thanks
Last edited by magzen on Sun Jan 31, 2016 12:07 pm, edited 1 time in total.
Top

magzen
Posts: 47
Joined: Sat Sep 05, 2015 6:16 pm

Re: Opencart SEO with Nginx + PHP-FPM not working
  • Quote

Post by magzen » Sat Jan 30, 2016 9:47 pm

So far i have managed to make the website front show up, but for that i did have to switch of SEO module, the categories and products shows 404 error. If there would have been a template for Opencart like there is for Wordpress, Joomla it would have made things little easier to solve.
Top

magzen
Posts: 47
Joined: Sat Sep 05, 2015 6:16 pm

Re: Opencart SEO with Nginx + PHP-FPM 404 Error
  • Quote

Post by magzen » Sun Jan 31, 2016 5:12 pm

Found following link that explains how to add a file called opencart.conf with code to make Opencart work with SEO, and some changes to nginx.conf maybe this can work, but if someone with experience can rewrite the code to work with Vestacp

http://isenselabs.com/posts/how-to-inst ... inx-server


root@nginx:/ # edit /usr/local/etc/nginx/sites/opencart.conf

Code: Select all

# /usr/local/etc/nginx/sites/opencart.conf
server {
    listen 80;
#here we set the domain name that we use for this installation 
    server_name opencart.yourdomain.com;
    access_log /var/log/www/opencart.access-log;
    root /usr/local/www/nginx/opencart/;
    index index.php index.html index.htm;

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx/opencart$fastcgi_script_name;
        include fastcgi_params;
    }
}
    
    

and

root@nginx:/ # edit /usr/local/etc/nginx/nginx.conf

Code: Select all

# /usr/local/etc/nginx/nginx.conf
user  www;
worker_processes  1;
error_log  /var/log/nginx-error.log;
events {
   worker_connections  1024;
}
http {
   include       mime.types;
   default_type  application/octet-stream;
   access_log  /var/log/nginx-http.log;
   sendfile        on;
   keepalive_timeout  65;
   server {
       listen       80; 
       #here we set the domain name for the server web root directory 
       server_name  yourdomain.com;
       access_log  /var/log/nginx-access.log;
       location / {
           root   /usr/local/www/nginx;
           index  index.html index.htm index.php;
       }

       error_page  404              /404.html;
       error_page   500 502 503 504  /50x.html;
       location = /50x.html {
           root   /usr/local/www/nginx-dist;
       }
       location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
           include        fastcgi_params;
       }
       location ~ /\.ht {
           deny  all;
       }
   }
   # virtual hosting
  #here we include the rules from all  .conf files located in /usr/local/etc/nginx/sites/    
   include /usr/local/etc/nginx/sites/*.conf;  
   
}
Thanks
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Opencart SEO with Nginx + PHP-FPM 404 Error
  • Quote

Post by skurudo » Tue Feb 02, 2016 1:56 pm

but if someone with experience can rewrite the code to work with Vestacp
There is not so much changes, if when compared with default configs.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password