Hi,
I've installed nginx on a debian squeeze. I use a dydns address to access it (e.g mysite.dydns.org) but I can't find how to configure my vhost to manage several application (e.g. mysite.dydns.org/wordpress and mysite.dydns.org/rsslounge and mysite.dydns.org/phpmyadmin).
I made a symbolic link between /usr/share/phpmyadmin and /var/www/phpmyadmin
My default config is :
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /var/www/;
index index.html index.htm index.php;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# 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$ {
root /var/www;
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;
}
# rewrites von .htaccess:
rewrite ^/rsslounge/favicon.ico$ /rsslounge/public/favicon.ico;
rewrite ^/rsslounge/plugins/([^/]+)/(.*)$ /rsslounge/plugins/$1/public/$2;
rewrite ^/rsslounge/favicons/(.*)$ /rsslounge/data/favicons/$1;
rewrite ^/rsslounge/thumbnails/(.*)$ /rsslounge/data/thumbnails/$1;
rewrite ^/rsslounge/javascript/(.*)$ /rsslounge/public/javascript/$1;
rewrite ^/rsslounge/stylesheets/(.*)$ /rsslounge/public/stylesheets/$1;
}
I tried to make vhost for my different applications but it seems I need one domain name for each application but with my dyndns account it's impossible.
Plus, how I define different url rewritting rule for my application ?
Regards,
megalo