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

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

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

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

        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 ::1/128


Open in new window


#<VirtualHost *>
#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

# 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

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

# 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
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

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses

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

        <Directory />
                Options FollowSymLinks
                AllowOverride All


Open in new window

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.


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


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

see how that works

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.