View Single Post
  #3  
Old 25th November 2010, 14:34
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 435
Thanks: 33
Thanked 56 Times in 39 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 14:37.
Reply With Quote