Apache site config help

Posted on 2013-10-10
Medium Priority
Last Modified: 2016-03-18
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

Question by:VantaBods
1 Comment
LVL 36

Accepted Solution

Seth Simmons earned 1500 total points
ID: 39572682
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question