Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th November 2010, 12:03
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support On Ubuntu 10.10

There seems to be something wrong/missing with the nginx configuration file.
/etc/nginx/sites-available/default

First page of the Joomla site works fine but all the other pages get
404 Not Found
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Sponsored Links
  #2  
Old 25th November 2010, 12:10
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default Joomla SEO

Looks like it's a SEO issue. I'm wondering if anyone has a working solution for Joomla's Apache mod_rewrite or .htaccess settings?
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #3  
Old 25th November 2010, 13:34
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

Almost solved it.

With this nginx config I can have nearly the same functionality than with apache mod_rewrite and .htaccess combination. (+Joomla SEO)

Problem is some components that use 'home' directory feel it is in the wrong place...

Quote:
The home directory doesn't exist, check your settings. (/usr/local/nginx/html)
Here is the nginx config.

Quote:
server {

listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
large_client_header_buffers 4 8k;
server_name _;

access_log /var/log/nginx/localhost.access.log;

location / {
try_files $uri $uri/ /index.php?q=$request_uri;
root /var/www;
index index.php index.html;
}


#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /400.html;
location = /400.html {
root /var/www/error;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
I can't find that home path defined anywhere.
Maybe it's nginx default?
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 25th November 2010 at 13:37.
Reply With Quote
  #4  
Old 26th November 2010, 09:09
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

Edit: Looks like this was DNS issue. Forget it...


My excursion with nginx has run in to a new difficulty.
So far we have redirected many sites that come with different domain names (.org .net .info etc.) to the main domain site by using ISPConfig's site/option page's handy apache form.

It seems though that if traffic is redirected to a nginx server this will stop working.

hmm... How to overcome the problem?

This is the type of code we have been using to do the redirecting...

Quote:
Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTP_HOST} !^internet-palvelut.fi$ [NC]
RewriteRule ^(.*)$ http://www.internet-content.net/fi/$1 [L,R=301]

RewriteCond %{HTTP_HOST} !^www.internet-palvelut.fi$ [NC]
RewriteRule ^(.*)$ http://www.internet-content.net/fi/$1 [L,R=301]
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 26th November 2010 at 10:14.
Reply With Quote
  #5  
Old 27th November 2010, 11:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

This link might help: http://wiki.nginx.org/NginxHttpRewriteModule
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 27th November 2010, 21:53
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
 
Default

Actually my config above works quite well with Joomla SEO. Only thing still unclear is how to define the 'home' directory that nginx seems to look for.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Reply

Bookmarks

Tags
nginx

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
nginx Php5 MySQL on ubuntu 9.04 haloangelboy HOWTO-Related Questions 1 8th September 2009 13:59
help with php5 and mysql on ubuntu lamp. meomike2000 Programming/Scripts 4 6th March 2009 19:12
eaccelerator installation - can't find php5-config tom Programming/Scripts 9 15th May 2006 15:36


All times are GMT +2. The time now is 15:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.