migrate from apache to nginx

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
umarzuki
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Fri May 02, 2008 8:35 am
Location: Malaysia
Contact:

migrate from apache to nginx

Post by umarzuki » Wed Feb 11, 2015 8:07 am

joomla 2.5, apache2 & mysql 5.5 to server with nginx 1.4 & mariadb 5.5

after I copied joomla folders (2), make sure there's no more sql connection error, one simply redirects to /en/ and got 404 error, other one managed to be displayed but a few pages from menu and links with .html (SEF maybe?) upon clicking on them would send me to a 404 error page.

What would I need to make this a successful migration?

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24927
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: migrate from apache to nginx

Post by pe7er » Wed Feb 11, 2015 8:45 am

Nginx does not use Apache's .htaccess that is needed for full Joomla SEF with URL rewrites.

You should add a line of code to the Nginx virtual domain block of your site instead.
See https://docs.joomla.org/Enabling_Search ... s_on_Nginx
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

umarzuki
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Fri May 02, 2008 8:35 am
Location: Malaysia
Contact:

Re: migrate from apache to nginx

Post by umarzuki » Wed Feb 11, 2015 4:23 pm

thanks!

did a test on virtualbox to simulate it

managed to get from 404 to actually displaying joomla's pages. Although it is not same as one that I'm suppose to migrate (which does not show index.php and have .html postfix)

before

Image

after

Image

vhost's setting

Code: Select all

server {
	listen 80;
	root /var/www/htdocs/minis/kotak;
	index index.php index.html index.htm;
	server_name www.kotak.mylab.lab;
	location / {
		try_files $uri $uri/ /index.php?q=$request_uri;
	}
	location ~ \.php$ {
		fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass unix:/var/run/php5-fpm.sock;
		fastcgi_index index.php;
		include fastcgi_params;
	}
}


Locked

Return to “Migrating and Upgrading to Joomla! 2.5”