I have a subdomain lms.domain.com on godaddy's servers shared hosting. I want the subdomain to point to the server ipaddress/moodle
I have configured it but the subdomain is redirecting to IP address. what I want is the site to be accessed as lms.domain.com
#
# The default server
#
server {
listen 80 default_server;
#listen [::]:80 default_server;
server_name _;
root /var/www/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
index index.html index.php index.htm;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
location /phpmyadmin {
alias /usr/share/phpMyAdmin/;
client_max_body_size 200M;
}
}
server {
listen 80;
listen [::]:80;
root /var/www/html/moodle;
index index.html index.htm index.php;
server_name lms.rguktn.ac.in;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri @uri/ =404;
}
}