Apache site config help

HI All,

robabyl very easy, but I am trying to configure a new website called sugarcrm.domain.co.uk, but all requests are automatically pushed to the Nagios directive.

Any ideas how to resolve this

Default
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Open in new window


Nagios

#<VirtualHost *>
#ServerName 195.137.61.81
#ServerAdmin opsview@opsview.com

# Any files in here will be served by Apache
DocumentRoot /usr/local/nagios/share
<Directory /usr/local/nagios/share>
    Order allow,deny
    Allow from all
</Directory>

# This alias required so that Apache serves NMIS' static files
Alias /static/nmis/ "/usr/local/nagios/nmis/htdocs/"
<Directory /usr/local/nagios/nmis/htdocs>
    Order allow,deny
    Allow from all
</Directory>

ProxyRequests Off
<Proxy *>
        Order deny,allow
        Allow from all
</Proxy>

# Don't proxy error pages as these are served statically
ProxyPass /error_pages !
ProxyPass /javascript !
ProxyPass /stylesheets !
ProxyPass /help !
ProxyPass /images !
ProxyPass /xml !
ProxyPass /favicon.ico !
ProxyPass /graphs !
ProxyPass /static !
ProxyPass /media !

# Rules for those people using webmin on their server - this allows an entry
# to be added to the Modules list
#RewriteEngine on
#RewriteRule ^/webmin(.*) https://%{SERVER_NAME}:10000/$1 [R=permanent,L]

# Ensure the apache user is a member of the nagcmd group.
#<Directory /usr/local/nagios/nagvis>
#    Order allow,deny
#    Allow from all
#</Directory>
Alias /nagvis /usr/local/nagios/nagvis
ProxyPass /nagvis !
# Have two authentication options for Nagvis.
# Authtkt requires the AuthTkt apache module and allows single-sign-on with Opsview
# Set this to the same as the shared secret in opsview.conf
TKTAuthSecret "shared-secret-please-change"
<Location /nagvis>
   Order allow,deny
   Allow from all
   AuthType None

Open in new window


SugarCRM
# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost 10.1.1.160:80

<VirtualHost *:80>
DocumentRoot /var/www/sugarcrm
ServerName sugarcrm.domain.co.uk


        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>


</VirtualHost>

Open in new window

VantaBodsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Seth SimmonsSr. Systems AdministratorCommented:
1) change your NameVirtualHost to *:80

Note that the argument to the <VirtualHost> directive must exactly match the argument to the NameVirtualHost directive.

http://httpd.apache.org/docs/2.2/mod/core.html#namevirtualhost

2) put the nagios section in a virtual host (as *:80) and add the ServerName directive

http://httpd.apache.org/docs/2.2/vhosts/examples.html

3) add ServerName directive in the virtual host of the default section

see how that works
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.