Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
VPS Ubuntu server 18.04 // virtual host // website not loading

I have setup a website at a VPS with Ubuntu 18.04. I have only installed Apache and PHP and configured ufw to allow access through 80 and 443 ports.

At my registrar, since this actually is the main site for the server, I added the server ip for DNS: 192.188.78.105 and also modified nameserver to be ns1.justfitnessbooks.com and ns2.justfitnessbooks.com

FYI, ns1.xx and ns2.xxx work just fine because before this install, I had installed Vesta CP which installs a complete server package, and the site would load just fine, but it was impossible to use email with Vesta CP, so I uninstalled everything and started with a manual configuration.

My justfitnessbooks.com.conf file inside /etc/apache2/sites-available looks like this:

<VirtualHost *:80>

    ServerAdmin myemail@myserver.com
        ServerName justfitnessbooks.com
        ServerAlias www.justfitnessbooks.com
    DocumentRoot /var/www/html/justfitnessbooks.com/public_html

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

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

My justfitnessbooks.com.conf file inside /etc/apache2/sites-enabled looks like this:

<VirtualHost *:80>

    ServerAdmin myemail@myserver.com
        ServerName justfitnessbooks.com
        ServerAlias www.justfitnessbooks.com
    DocumentRoot /var/www/html/justfitnessbooks.com/public_html

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

</VirtualHost>

My /etc/hosts file looks like this:

192.188.78.105 justfitnessbooks.com
192.188.78.105 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
#::1 justfitnessbooks.com
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Doing ls -la permissions for the site directory looks like this:

admin@server-12345:/var/www/html$ ls -la
total 24
drwxr-xr-x 3 root root  4096 Mar  8 15:39 .
drwxr-xr-x 3 root root  4096 Mar  8 01:53 ..
-rwxr-xr-x 1 root root 10918 Mar  8 01:53 index.html
drwxr-xr-x 3 root root  4096 Mar  8 15:39 justfitnessbooks.com
admin@server-12345:/var/www/html$

I have restarted apache with systemctl restart apache2

And, when I check the host for justfitnessbooks.com I get the below message:

admin@server-12345:~$ host justfitnessbooks.com
justfitnessbooks.com has address 192.188.78.105
Host justfitnessbooks.com not found: 2(SERVFAIL)
admin@server-12345:~$

What am I missing? Am I to modified anything related to ns1.xxx ns2.xxx at my server?

Any suggestions?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!