I'm trying to prototype a website on my server using a default domain name I get through my hosting provider and I'd like to run it off a subdomain but I'm having trouble doing so.
The domain I'm trying to add a subdomain to is:
ks12345.kimsufi.com
And I'd like to temporarily run a site off test.ks12345.kimsufi.com
the domain does work with my server as visiting ks12345.kimsufi.com
returns an nginx hello world type message which is what I expect and I have managed to serve pages from ks12345.kimsufi.com/test
but this messes with all my paths that the site uses so its not really an option.
I've tried a few different things but I cant seem to find a way to access the site from test.ks12345.kimsufi.com
which is my ultimate goal, does anybody know if this is possible or how to do this?
Here's the contents of the vhost file I'm trying so far:
server {
listen 80;
root /var/www/example.com;
index index.html index.htm;
server_name test.ks12345.kimsufi.com;
location / {
root /var/www/eample.com/;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_pass 127.0.0.1:9003;
}
}
ps. all the fcgi stuff inside location / is web.py setup and has worked previously so i don't think thats the problem
test.ks12345.kimsufi.com
which is what I am trying to acheive