Server ip page shows random user website

Thunderbite

Verified User
Joined
Sep 30, 2008
Messages
24
Hi All,

I am having some weird troubles on my DirectAdmin box. When I open a browser and type in the servers ip address. The page shows a website of a customer instead of the "normal" message saying Apache is functioning normally.

This sucks big time since I would like to put some general page in place.

I checked that the ip address is not owned or anything da is saying:

Status -> Server
Reseller -> Me
user(s) -> 26
Nameserver -> empty
Netmask -> 255.255.255.0

Anyone an idea how to get this ip to show a general page instead of just a customers/users website.

Thanks in advance,
Mark
 
Check /etc/httpd/conf/extra/directadmin-vhosts.conf

Sorry I shortened da, try this.

You should see lines of included files for each user

Include /usr/local/directadmin/data/users/USERNAME/httpd.conf
 
Last edited:
Ah thanks :)

I saw that file indeed and it has 31 lines of includes... pretty mutch all users that are on the box.

- Mark
 
Below the contents of: /etc/httpd/conf/extra/httpd-vhosts.conf

Weird thing I noticed there is that there are 2 ips mentioned. But both are old and not configured on the box anymore... they have been replaced with new ones when my dedicated provider moved data center.

- Mark


#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

##########################################################
# Use name-based virtual hosting. #
# All NameVirtualHost lines are in this file #
# Don't remove this line or apache will generate errors. #
##########################################################
Include /etc/httpd/conf/ips.conf

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 00.00.000.000:80>
ServerAdmin webmaster@localhost
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost 00.00.000.000:443>
ServerAdmin webmaster@localhost
AliasMatch ^/~([^/]+)(/.*)* "/home/$1/public_html$2"
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /var/log/httpd/homedir.log homedir

SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
</VirtualHost>
 
Good! I write in bold type in the box where you enter server / main IP

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

##########################################################
# Use name-based virtual hosting. #
# All NameVirtualHost lines are in this file #
# Don't remove this line or apache will generate errors. #
##########################################################
Include /etc/httpd/conf/ips.conf

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost SERVER_MAIN_IP:80>
ServerAdmin webmaster@localhost
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost SERVER_MAIN_IP:443>
ServerAdmin webmaster@localhost
AliasMatch ^/~([^/]+)(/.*)* "/home/$1/public_html$2"
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /var/log/httpd/homedir.log homedir

SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
</VirtualHost>

Edit and save.

Restart Apache :)
 
Cool! :)

Now we are one step further... it does not show any users website's anymore but now it shows a completely blank page....

- Mark
 
Master! :cool:

It works! thanks a billion for the help I really really appreciate it :)

Have a nice sunday!

- Mark
 
Back
Top