Linux / UNIX Tech Support Forum
This is a discussion on Configuring IPs on apache within the Web servers forums, part of the Mastering Servers category; Hi, First post here. I have a dedicated server which I use to run a number of domains. The server ...
Register free or login to your account to remove all advertisements.
|
|||||||
| Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
Hi,
First post here. I have a dedicated server which I use to run a number of domains. The server had 1 ip and 1 ssl cert. Recently I've had need to add another ssl cert. To do this I have had to purchase a new IP. For the site that I wish to use this new IP I have set this up correctly in my control panel. However when I try to navigate to the site now, I am presented with a standard default page when there should be an entire site there. When I connect via SCP to the new IP I am shown all the files I would expect to see. Is there something obvious that I need to do in my httpd.conf file to allow this to work? What seems weird is that sometimes the site does appear to show and then goes again. I'm not sure if I've therefore if I've done something that gets it working or whether caching is affecting it, though it doesn't matter if I refresh with f5 or ctrl+f5. Elsewhere I've been told the issue may relate to the following:
|
|
||||
|
You have been told correctly. Here are some links that may help. These vhosts can be defined in the httpd.conf file.
Quote:
Code:
<VirtualHost www.smallco.com>
ServerAdmin webmaster@mail.smallco.com
DocumentRoot /groups/smallco/www
ServerName www.smallco.com
ErrorLog /groups/smallco/logs/error_log
TransferLog /groups/smallco/logs/access_log
</VirtualHost>
Quote:
Quote:
Also upon making any changes to the httpd.conf file you will need to restart the daemon. Feel free to post some of your attempts if you are a bit lost. I will try to assist. HTH, Jaysunn |
|
|||
|
Hi,
Thanks for getting back,so at the top of httpd.conf file I have 2 listen directives (changes ips here for generalisation): Code:
Listen 192.168.0.1:80 Listen 192.168.0.2:80 Code:
<VirtualHost 192.168.0.2:80>
DocumentRoot /var/www/vhosts/example.com/httpdocs/
ServerName www.example.com
Errorlog /var/www/vhosts/example.com/logs/error_log
TransferLog /var/www/vhosts/example.com/logs/access_log
</VirtualHost>
The DNS is all setup correctly and using $_SERVER['SERVER_ADDR'] displays the correct IP (when the page loads of course) |
|
||||
|
Also we use the * as the bind address.
Code:
# BindAddress: You can support virtual hosts with this option. This directive # is used to tell the server which IP address to listen to. It can either # contain "*", an IP address, or a fully qualified Internet domain name. # See also the <VirtualHost> and Listen directives. # BindAddress * jaysunn Last edited by jaysunn; 29th November 2009 at 09:33 PM. Reason: changed the Bind Address to a * that we use |
![]() |
|
|
| Tags |
| apache, debian httpd, httpd, httpd.conf, redhat httpd, rhel httpd |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Configuring Yum Server | knvpavan | CentOS / RHEL / Fedora | 5 | 20th May 2009 03:16 PM |
| configuring DNS on Solaris 10 | pappu08 | Solaris/OpenSolaris | 2 | 7th April 2009 04:39 AM |
| Configuring linux to windows | sumit | Networking, Firewalls and Security | 1 | 3rd March 2009 05:53 PM |
| Error while configuring Yum | linux_sym | Getting started tutorials | 3 | 3rd July 2008 11:44 AM |
| Configuring iscsi RHEL | raj | CentOS / RHEL / Fedora | 1 | 26th November 2007 08:27 AM |