Ubuntu Image Wordpress

March 28, 2019 722 views
Apache WordPress Ubuntu

Hi all,
I installed Ubuntu droplet with the preconfigured image of Wordpress - also installed Https,
My question is how I can add some other page for example mail.domain.com
What I already did
create a folder in directory /var/www/mail with the index.html file
created new mail.conf file
<VirtualHost *:80>
ServerAdmin webmaster@localhost

    ServerName $mail.mydomain.com
    ServerAlias www.mail.mydomain.com

    DocumentRoot /var/www/mail/index.html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost> wordpress-s-XXXX localhost
104.xx.xx.xx mail.mydomain.com

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

and it’s still not working if I go to the page mail.mydomain.com nothing -page not found

Should I allow HTTP traffic in this case? or its permission issie
drwxr-xr-x 5 www-data www-data 4096 Mar 26 08:38 html
drwxrwxr-x 2 www-data www-data 4096 Feb 11 15:36 html.old
drwxrwxr-x 4 root root 4096 Mar 28 10:57 mail

also created DNS record in panel

DNS records
Type Hostname Value TTL (seconds)


mail.mydomain.com Copy
directs to
104.xx.xx.xx Copy

3600 Copy

thanks in advance for you help

1 Answer

Creating an A record won’t make it available immediately since it needs some time to propagate. I suggest you wait at least 15 minutes before trying to access a newly created hostname. You can check if the record is propagated with the dig tool:

dig +short A mail.mydomain.com

and if it returns an IP address, it exists. You can also perform a DNS lookup against a particular resolver, such as Google’s like this:

dig +short A mail.mydomain.com @

Also make sure you have cleared all local DNS caches on your local machine before performing the above tests.

Have another answer? Share your knowledge.