In Nginx, I would like to redirect my subdomain.domain.com to domain.com/sub/ .how do I do that ? I would like to use the existing sites config file for domain.com instead of creating a new one.
the config file I have is (how do I add to this)
======
server {
listen 80;
server_name www.domain.com domain.com *.domain.com;
access_log /srv/www/domain.com/logs/access.log;
error_log /srv/www/domain.com/logs/error.log;
location / {
root /srv/www/domain.com/public_html;
index index.html index.htm;
}
location /phpmyadmin { root /usr/share; index index.php; }
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/domain.com/public_html$fastcgi_script_name;
}
}
=========