I've been using this tutorial to set up an Apache virtual host on my Ubuntu PC. I've created a no-ip domain
which I will be using as the hostname of my virtual host. I've followed every step of the tutorial but it doesn't work. Here's the virtual host file and it's named crm2plus.ddns.net.conf
:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@crm2plus.ddns.net
ServerName crm2plus.ddns.net
ServerAlias crm2plus.ddns.net
DocumentRoot /var/www/crm2plus.ddns.net/public_html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
I've also added the ip and domain name pair to my local hosts file and here's how it looks:
23.253.21.201 shhasan.ddns.net
127.0.1.1 Ubuntu-Dev
127.0.0.1 localhost
99.250.71.177 crm2plus.ddns.net
# 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
When I navigate to crm2plus.ddns.net
through chrome I get the web page not available page
. shhasan.ddns.net
is working fine. When I type ssh-keygen -H -F crm2plus.ddns.net
into the terminal nothing shows up but when I type ssh-keygen -H -F shhasan.ddns.net
this is what shows up:
# Host shhasan.ddns.net found: line 14 type RSA
followed by the RSA key.
I've also looked at the Apache error and access logs. The error logs have a lot of repetition of such line of code:
[Fri Nov 14 17:44:50.304782 2014] [mpm_prefork:notice] [pid 21927] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.5 configured -- resuming normal operations
[Fri Nov 14 17:44:50.304801 2014] [core:notice] [pid 21927] AH00094: Command line: '/usr/sbin/apache2'
[Fri Nov 14 17:44:54.979832 2014] [mpm_prefork:notice] [pid 21927] AH00169: caught SIGTERM, shutting down
I searched for caught SIGTERM, shutting down
and I found that this was part of normal operation. I have no idea of where I'm going wrong. It had worked previously for shhasan.ddns.net
but it doesn't work for crm2plus.ddns.net
.
Output of netstat -pan | grep 80
:
unix 2 [ ] STREAM CONNECTED 528079 5594/gvfsd-http @/dbus-vfs-daemon/socket-vc8j6I1O
unix 3 [ ] STREAM CONNECTED 18079 2579/dbus-daemon @/tmp/dbus-nICf5nhpay
unix 3 [ ] STREAM CONNECTED 18067 2579/dbus-daemon @/tmp/dbus-nICf5nhpay
unix 2 [ ] DGRAM 8009 -
unix 3 [ ] STREAM CONNECTED 18116 2680/indicator-appl
unix 3 [ ] STREAM CONNECTED 18076 2488/dbus-daemon @/tmp/dbus-PTGbrLg1OB
unix 3 [ ] STREAM CONNECTED 18085 2587/ibus-ui-gtk3
unix 2 [ ] STREAM CONNECTED 528093 5594/gvfsd-http @/dbus-vfs-daemon/socket-XXVPW75v
unix 3 [ ] STREAM CONNECTED 20680 2827/compiz
unix 3 [ ] STREAM CONNECTED 18072 2488/dbus-daemon @/tmp/dbus-PTGbrLg1OB
unix 3 [ ] STREAM CONNECTED 225804 4011/chrome
unix 3 [ ] STREAM CONNECTED 18008 2488/dbus-daemon @/tmp/dbus-PTGbrLg1OB
unix 3 [ ] STREAM CONNECTED 228060 2541/ibus-daemon @/tmp/dbus-8s7gwnYp
unix 3 [ ] STREAM CONNECTED 18071 2488/dbus-daemon @/tmp/dbus-PTGbrLg1OB
unix 3 [ ] STREAM CONNECTED 225280 4011/chrome
unix 3 [ ] STREAM CONNECTED 18069 2607/at-spi2-regist
unix 3 [ ] STREAM CONNECTED 18001 2501/window-stack-b
unix 2 [ ] STREAM CONNECTED 9700589 5594/gvfsd-http @/dbus-vfs-daemon/socket-80dWj6IE
unix 3 [ ] STREAM CONNECTED 18044 2488/dbus-daemon @/tmp/dbus-PTGbrLg1OB
netstat -pan | grep 80
and also check whetherNameVirtualHost
line is uncommented in the config file?netstat -pan | grep 80
. "the config file" as incrm2plus.ddns.net.conf
or is it some other file ? There is noNameVirtualHost
line incrm2plus.ddns.net.conf
.