Webfoundry
Verified User
Hi all,
I'm trying to implement this code to support clean (aka Search Engine Friendly) URLs for ALL sites in the server by following next tutorial for Joomla! : http://docs.joomla.org/Nginx
This doesn't seem to work as it looks like DA uses /home as homedirectory for sites, while nginx.conf refers to /var/www/html as root
Is there a fix to get clean URL's to work ?
Is it perhaps also due to this "wrong" root location that next code in /usr/local/directadmin/data/users/admin/nginx.conf my .htaccess files don't get denied as they should ?
Thanks for all your support and kind help.
Sixten
I'm trying to implement this code to support clean (aka Search Engine Friendly) URLs for ALL sites in the server by following next tutorial for Joomla! : http://docs.joomla.org/Nginx
Code:
location / {
try_files $uri $uri/ /index.php?$args;
}
This doesn't seem to work as it looks like DA uses /home as homedirectory for sites, while nginx.conf refers to /var/www/html as root
Code:
server {
listen xxx.xxx.xxx.xxx:80;
server_name $hostname xxx.xxx.xxx.xxx;
[B]root /var/www/html;[/B]
index index.html index.htm index.php;
location / {
access_log off;
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
[B][I]try_files $uri $uri/ /index.php?$args; --> does not work[/I][/B]
}
location /nginx_static_files/ {
access_log /var/log/nginx/access_log_proxy;
alias /var/www/html/;
internal;
}
}
Is there a fix to get clean URL's to work ?
Is it perhaps also due to this "wrong" root location that next code in /usr/local/directadmin/data/users/admin/nginx.conf my .htaccess files don't get denied as they should ?
Code:
# deny access to apache .htaccess files
location ~ /\.ht
{
deny all;
}
Thanks for all your support and kind help.
Sixten