Skip to main content

Thread: apache questions. - virtual hosts?


hi guys,
im getting head around apache @ moment , need advice, have linux box running nagios monitor systems me, when goto servers ip address comes default works! page, if put sub folder onto end of ip address i.e. /nagios/ loads nagios interface.

in conf.d folder there nagios.conf file , in there code looking (as wasnt in default file in sites-available), question is, rather have code in there can put virtualhost's conf file in sites-available folder?

reason want to-do keep things easier remember want setup sub-domain when hit subdomain goes directly nagios folder.

@ moment virtualhost config looks this

code:
<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          </directory>            scriptalias /cgi-bin/ /usr/lib/cgi-bin/          <directory "/usr/lib/cgi-bin">                  allowoverride none                  options +execcgi -multiviews +symlinksifownermatch                  order allow,deny                  allow          </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          allow 127.0.0.0/255.0.0.0 ::1/128      </directory>    </virtualhost>
, nagios conf file looks this,

code:
scriptalias /nagios/cgi-bin "/usr/local/nagios/sbin"    <directory "/usr/local/nagios/sbin">  #  sslrequiressl     options execcgi     allowoverride none     order allow,deny     allow  #  order deny,allow  #  deny  #  allow 127.0.0.1     authname "nagios access"     authtype basic     authuserfile /usr/local/nagios/etc/htpasswd.users     require valid-user  </directory>    alias /nagios "/usr/local/nagios/share"    <directory "/usr/local/nagios/share">  #  sslrequiressl     options none     allowoverride none     order allow,deny     allow  #  order deny,allow  #  deny  #  allow 127.0.0.1     authname "nagios access"     authtype basic     authuserfile /usr/local/nagios/etc/htpasswd.users     require valid-user  </directory>

correct in thinking can merge 2 config files this?


code:
<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          </directory>            scriptalias /cgi-bin/ /usr/lib/cgi-bin/          <directory "/usr/lib/cgi-bin">                  allowoverride none                  options +execcgi -multiviews +symlinksifownermatch                  order allow,deny                  allow          </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          allow 127.0.0.0/255.0.0.0 ::1/128      </directory>        scriptalias /nagios/cgi-bin "/usr/local/nagios/sbin"        <directory "/usr/local/nagios/sbin">      #  sslrequiressl         options execcgi         allowoverride none         order allow,deny         allow      #  order deny,allow      #  deny      #  allow 127.0.0.1         authname "nagios access"         authtype basic         authuserfile /usr/local/nagios/etc/htpasswd.users         require valid-user      </directory>        alias /nagios "/usr/local/nagios/share"        <directory "/usr/local/nagios/share">      #  sslrequiressl         options none         allowoverride none         order allow,deny         allow      #  order deny,allow      #  deny      #  allow 127.0.0.1         authname "nagios access"         authtype basic         authuserfile /usr/local/nagios/etc/htpasswd.users         require valid-user      </directory>    </virtualhost>

quick bump in hope sees , has idea


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] apache questions. - virtual hosts?


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account