Ask Your Question

Revision history [back]

Hosting subdomains in Fedora Server 25

Dear friends, how are you? After several days reading and watching videos about how to host a subdomain in apache I've had no luck. I have one domain for test purposes, created the folders under /var/www/html and added to my httpd.conf the following code:

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot /var/www/html/

<VirtualHost *:80>
    DocumentRoot /var/www/html/

httpd -S is showing:

[root@site conf]# httpd -S
[Mon Mar 20 17:19:00.518210 2017] [so:warn] [pid 2944] AH01574: module rewrite_module is already loaded, skipping
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:358
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::8bc:3d3d:7740:7241. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  fe80::8bc:3d3d:7740:7241 (/etc/httpd/conf.d/ssl.conf:56)
*:80                   is a NameVirtualHost
         default server (/etc/httpd/conf/httpd.conf:359)
         port 80 namevhost (/etc/httpd/conf/httpd.conf:359)
         port 80 namevhost (/etc/httpd/conf/httpd.conf:365)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex mpm-accept: using_defaults
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
PidFile: "/run/httpd/"
User: name="apache" id=48
Group: name="apache" id=48

But, I can only access the main domain, meanwhile the subdomain keeps showing ERR_NAME_NOT_RESOLVED.

Any help is much appreciated.