Munin Dynazoom not working on Ubuntu - apache2

I recently installed Munin on my machines. I got everything to work and the data is actually being drawn on the graphs! :)
But, for some reason, when I click on each individual graph, it brings me to the dynazoom page but it's all plain text with no images :(
Here is my apache.conf:
# Enable this for template generation
Alias /munin /var/cache/munin/www
# Enable this for cgi-based templates
#Alias /munin-cgi/static /var/cache/munin/www/static
#ScriptAlias /munin-cgi /usr/lib/munin/cgi/munin-cgi-html
#<Location /munin-cgi>
# Order allow,deny
# Allow from localhost 127.0.0.0/8 ::1
# AuthUserFile /etc/munin/munin-htpasswd
# AuthName "Munin"
# AuthType Basic
# require valid-user
#</Location>
<Directory /var/cache/munin/www>
Order allow,deny
# Allow from localhost 127.0.0.0/8 ::1
Allow from all
Options None
AllowOverride None
# This file can be used as a .htaccess file, or a part of your apache
# config file.
#
# For the .htaccess file option to work the munin www directory
# (/var/cache/munin/www) must have "AllowOverride all" or something
# close to that set.
#
AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
require valid-user
# This next part requires mod_expires to be enabled.
#
# Set the default expiration time for files to 5 minutes 10 seconds from
# their creation (modification) time. There are probably new files by
# that time.
#
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>
</Directory>
# Enables fastcgi for munin-cgi-html if present
#<Location /munin-cgi>
# <IfModule mod_fastcgi.c>
# SetHandler fastcgi-script
# </IfModule>
#</Location>
#<Location /munin-cgi/static>
# SetHandler None
#</Location>
# Enables fastcgi for munin-cgi-graph if present
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
# AuthUserFile /etc/munin/munin-htpasswd
# AuthName "Munin"
# AuthType Basic
# require valid-user
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html
<Location /munin-cgi/munin-cgi-html>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
# AuthUserFile /etc/munin/munin-htpasswd
# AuthName "Munin"
# AuthType Basic
# require valid-user
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
Any reason why this could not be working? If I haven't given enough information, please let me know. Thank you

Enabling the apache2 cgi (or cgid) makes the dynazoom work.
sudo a2enmod cgi; sudo service apache2 restart

I had the same issue on Ubuntu 14.04.
By checking /var/log/apache2/error.log I found the script complaining about missing modules:
Can't locate CGI/Fast.pm in #INC (you may need to install the CGI::Fast module) (#INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /usr/lib/munin/cgi/munin-cgi-graph line 36.
I did install the CGI::Fast module to solve the issue:
sudo apt-get install libcgi-fast-perl
There is no need for any rewrite rule as indicated in another answer. Packages in Ubuntu 14.04 have the path names configured correctly.

In addition to ermannob's answer; my apache2 error.log reported
AH01797: client denied by server configuration: /usr/lib/munin/cgi/munin-cgi-graph
which stopped me from messing around with file permissions within the OS and caused me to look at the apache config. All that was required was to change
<Location /munin-cgi/munin-cgi-graph>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
...
in /etc/apache2/conf-enabled/munin.conf, to
<Location /munin-cgi/munin-cgi-graph>
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
I did not need to install any fastcgi packages and followed the tutorial here. They suggest that configuration be added to the apache.conf file directly, however, relaxing the permissions in the conf-enabled/munin.conf file (for /munin, /munin-cgi/munin-cgi-graph and /munin-cgi/munin-cgi-html) was sufficient. I omitted the changes to apache.conf.

When running Ubuntu 14.04 I fixed this on my own servers by updating the apache config in /etc/apache2/conf-available/munin.conf from 2.2 style to 2.4
Example:
<Directory /var/cache/munin/www>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
....
</Directory>
needs to be changed to
<Directory /var/cache/munin/www>
# Order allow,deny
# Allow from localhost 127.0.0.0/8 ::1
Require all granted
....
</Directory>
or you could do
Require host localhost
or
Require ip 127.0.0.0/8 ::8
see apache documentation about the changes here. By the time I realized this, I had already gone through and installed FastCGI and the perl module listed in this thread. This change would need to be done to all the location/directory areas you see in munin.conf.

I had the same problem on Debian 8. I've edited the file /etc/munin/apache24.conf like that:
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
</Directory>
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
Then I installed the libapache2-mod-fcgid as mentioned earlier.
After a munin-node restart, it's working correctly.

You should change the configuration part about the munin-cgi-graph, setting the same permissions as the main section. Here's your configuration:
# Enables fastcgi for munin-cgi-graph if present
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
# AuthUserFile /etc/munin/munin-htpasswd
# AuthName "Munin"
# AuthType Basic
# require valid-user
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
change it to this:
# Enables fastcgi for munin-cgi-graph if present
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Order allow,deny
# Allow from localhost 127.0.0.0/8 ::1
Allow from all
AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
require valid-user
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>
Additionally I had to install the libcgi-fast-perl package, doing this:
sudo apt-get install libcgi-fast-perl
Checking /var/log/apache2/error.log helped me a lot.

I had experienced the same behavior in Ubuntu 14.04 LTS. The reason was the image URL in the dynazoom page was incorrectly using /cgi-bin/munin-cgi-graph/ instead of /munin-cgi/munin-cgi/graph/ so instead of hunting down in the code to fix this bug I worked around it with a quick rewrite rule:
RewriteRule ^/cgi-bin/munin-cgi-graph/(.*) /$1
Hope this helps

In my case following https://bugs.launchpad.net/ubuntu/+source/munin/+bug/1258026 and http://munin-monitoring.org/wiki/MuninConfigurationMasterCGI worked.
The only problematic part was where to put Apache virtual host configuration, it turned out that placing it at /etc/apache2/sites-enabled/001-munin.conf worked.

Related

setup apache reverse proxy from localhost to domain.com/etherpad

Good evening,
I am trying to set up my apache2 reverse proxy
(following https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy)
for etherpad lite
(following https://www.howtoforge.com/tutorial/ubuntu-etherpad-editor-server-installation/, except for the nginx part).
I use http->ssl redirection. Since I use letsencrypt I can only access domain.com and not etherpad.domain.com (at least firefox won't let me and I want to avoid changing that certificate each time I add a new site). So I would like to access my etherpad just as I do access my other sites: domain.com/etherpad. However I always get a 404 trying to get to the site. Looking at a working example, in my nextcloud.conf file I have a line saying:
Alias /nextcloud /local/path/to/nextcloud
However the etherpad reverse proxy virtual host file looks entirely different, the key difference is etherpad not having a local folder but only a mysql database. (Please correct me if this is wrong)
So I tried changing the ssl example from the second link to the following, but it does not work. Please understand that I changed domain name and some internal paths, but "apache2ctl configtest" succeeds and the service is running without error.
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName randomisedDomain.com/etherpad
# SSL configuration
SSLEngine on
# If you hold wildcard certificates for your domain the next two lines are not necessary.
SSLCertificateFile "/working/path/to/fullchain.pem"
SSLCertificateKeyFile "/working/path/to/privkey.pem"
ProxyVia On
ProxyRequests Off
ProxyPreserveHost on
<Location />
AuthType Basic
AuthName "Welcome to the randomisedDomain.com Etherpad"
AuthUserFile /working/path/to/etherpad.passwd
#AuthGroupFile /path/to/svn.group
Require user etherpad
ProxyPass http://localhost:9001/ retry=0 timeout=30
ProxyPassReverse http://localhost:9001/
</Location>
<Location /socket.io>
# This is needed to handle the websocket transport through the proxy, since
# etherpad does not use a specific sub-folder, such as /ws/ to handle this kind of traffic.
# Taken from https://github.com/ether/etherpad-lite/issues/2318#issuecomment-63548542
# Thanks to beaugunderson for the semantics
RewriteEngine On
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:9001/socket.io/$1 [P,L]
ProxyPass http://localhost:9001/socket.io retry=0 timeout=30
ProxyPassReverse http://localhost:9001/socket.io
</Location>
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Proxy>
</VirtualHost>
Any help for rerouting the localhost domain to randomisedDomain.com/etherpad is greatly appreciated !
Best regards
MAPster

The requested URL /< was not found on this server. on Nagios core Ubuntu 16.04

I have an Ubuntu 16.04 server running nagios3 from the apt repo.
I get the message The requested URL/< was not found on this server
The config file in etc/apache2/sites-available which is soft linked to sites-enabledconfig;
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName monitor.server.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.com.bundle.pem
SSLCertificateKeyFile /etc/ssl/private/server.com.key
SSLCACertificateFile /etc/ssl/certs/ca-certificates.crt
ServerName monitor.novarumcloud.com
DocumentRoot /usr/share/nagios3/htdocs
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
Alias /nagios3/images /usr/share/nagios3/htdocs/images
Alias /images /usr/share/nagios3/htdocs/images
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
Alias /stylesheets /etc/nagios3/stylesheets
Alias /nagios3/js /usr/share/nagios3/htdocs/js
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
Options FollowSymLinks
DirectoryIndex index.php index.html
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
require valid-user
</DirectoryMatch>
<Directory /usr/lib/cgi-bin/nagios3>
Options +ExecCGI
</Directory>
Why is this happening? I'm sure it's probably a simple config error on my part. I have SSL certificates installed and only port 443 open too

setting up apache2/graphite server

I've been trying to make my graphite server work but after reading so many tutorials of how to install and configure everything, I'm still stuck.
At this point, if I use a simple virtualHost, I can see that the apache2 is working fine ("It works!"), but once I enable the other site where the graphite is configured, I get a 503.
could anyone tell me whats wrong in my definitions? Thanks in advance!
# the main httpd.conf
#NameVirtualHost *:80
# This line also needs to be in your server's config.
# LoadModule wsgi_module modules/mod_wsgi.so
# You need to manually edit this file to fit your needs.
# This configuration assumes the default installation prefix
# of /opt/graphite/, if you installed graphite somewhere else
# you will need to change all the occurances of /opt/graphite/
# in this file to your chosen install location.
<IfModule !wsgi_module.c>
LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>
# XXvX You need to set this up!
# Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
WSGISocketPrefix run/wsgi
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
ErrorLog /opt/graphite/storage/log/webapp/error.log
CustomLog /opt/graphite/storage/log/webapp/access.log common
# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
# XXX You will need to create this file! There is a graphite.wsgi.example
# file in this directory that you can safely use, just copy it to graphite.wgsi
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
</Location>
# XXX In order for the django admin site media to work you
# XXX You need to set this up!
# Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
WSGISocketPrefix run/wsgi
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
ErrorLog /opt/graphite/storage/log/webapp/error.log
CustomLog /opt/graphite/storage/log/webapp/access.log common
# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
# XXX You will need to create this file! There is a graphite.wsgi.example
# file in this directory that you can safely use, just copy it to graphite.wgsi
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
</Location>
# XXX In order for the django admin site media to work you
# must change #DJANGO_ROOT# to be the path to your django
# installation, which is probably something like:
# /usr/lib/python2.6/site-packages/django
Alias /media/ "#DJANGO_ROOT#/contrib/admin/media/"
<Location "/media/">
SetHandler None
</Location>
# The graphite.wsgi file has to be accessible by apache. It won't
# be visible to clients because of the DocumentRoot though.
<Directory /opt/graphite/conf/>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
ServerName 54.12.34.222
Give in your public IP there. Why again do you mave multiple VirtualHosts defined in there?
<IfModule !wsgi_module.c>
LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>
# XXX You need to set this up!
# Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
WSGISocketPrefix run/wsgi
<VirtualHost *:80>
ServerName 54.100.200.100
DocumentRoot "/opt/graphite/webapp"
ErrorLog /opt/graphite/storage/log/webapp/error.log
CustomLog /opt/graphite/storage/log/webapp/access.log common
# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
# XXX You will need to create this file! There is a graphite.wsgi.example
# file in this directory that you can safely use, just copy it to graphite.wgsi
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
</Location>
# XXX In order for the django admin site media to work you
# must change #DJANGO_ROOT# to be the path to your django
# installation, which is probably something like:
# /usr/lib/python2.6/site-packages/django
Alias /media/ "#DJANGO_ROOT#/contrib/admin/media/"
<Location "/media/">
SetHandler None
</Location>
# The graphite.wsgi file has to be accessible by apache. It won't
# be visible to clients because of the DocumentRoot though.
<Directory /opt/graphite/conf/>
Order deny,allow
Allow from all
</Directory>
<Directory /opt/graphite/webapp>
Order deny,allow
Deny from all
AllowOverride All
AuthName "Graphite web access"
AuthType Basic
AuthUserFile /opt/graphite/passwd/passwords
Require user webyog
Allow from 122.181.14.62, 202.191.170.90
Satisfy Any
</Directory>
</VirtualHost>

Sublocation for Trac on Apache2 web server

I need to put Trac on a URL path other than /. If I take the configuration from http://trac.edgewall.org/wiki/TracOnUbuntu and modify the Location blocks, I get the error message "No handler matched request to /trac". How can I avoid this?
<VirtualHost *:80>
ServerName trac.local
<Location /trac> # instead of Location /
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/local/trac
PythonOption TracEnvParentDir /var/local/trac
PythonOption TracUriRoot /
PythonOption TracEnv /var/local/trac
# PythonOption TracEnvIndexTemplate /var/local/trac/templates/index-template.html
PythonOption TracLocale en_US.UTF8
PythonOption PYTHON_EGG_CACHE /tmp
Order allow,deny
Allow from all
</Location>
<Location /trac/login> # instead of /login
AuthType Basic
AuthName "myproject"
AuthUserFile /var/local/trac/.htpasswd
Require valid-user
</Location>
</VirtualHost>
How about adjusting 'PythonOption TracUriRoot /' too?
Furthermore please acknowledge, that mod_python is depreciated (end-of-life), and you should rather choose WSGI for new installations instead.

ZPanelcp , Domains activation not work

-Hello everyone , I just rent an a dedicated server (ubuntu 12.4) and i install apache + php, mySQL etc ...but using SSH to creat domains (virtual hosts) it is a litle bit laborer so I decided to install some GUI admin panel and also decided for ZPanelcp last version so everything installed fine without errors and I set first time two domains something like :
new.domain.com
new.otherdomain.com
these domains has been activated successfully without set zpanel DNS for those domains but next day I notice when I try to create again other domains in my ZPanel show as "live" but in my webbrowser can not see so in reality they were not activated , ok first time I Run Daemon again and restart BIND also restart apache I try a few changes in my server conf files but nothing I reboot my server also nothing my server use one static ip.
Here are my Zpanel, apache2 conf files.
Apache2 files:
folder files:
/etc/apache2/apache2.conf
# Here is last lines of this files related to my problem
# Include of directories ignores editors' and dpkg's backup files,
# see the comments above for details.
# Include generic snippets of statements
Include conf.d/
# Include the virtual host configurations:
Include sites-enabled/
ServerName cp.zpanel.com
Include /etc/zpanel/configs/apache/httpd.conf
/etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
/etc/apache2/sites-enabled/000-default
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/etc/zpanel/configs/apache/httpd.conf
# ZPanel Apache Include file for CentOS Linux
# Written by Bobby Allen, 15/05/2011
# Set the Zpanel Alias (used for development, sable will eventually use a VHOST)
Alias /zpanel /etc/zpanel/panel
# Setup the directory settings and PHP security flags for the Zpanel application directory.
<Directory /etc/zpanel/panel>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir /var/zpanel/temp
</IfModule>
</Directory>
# Disallow web access to directories that don't need it/that we don't want people looking in!
<Directory /etc/zpanel/panel/cnf>
Order Deny,Allow
Deny from All
</Directory>
# Set server tokens (security??)
ServerTokens Maj
# Now we include the generic VHOST configuration file that holds all the ZPanel user hosted vhost data
Include /etc/zpanel/configs/apache/httpd-vhosts.conf
/etc/zpanel/configs/apache/httpd-vhosts.conf
################################################################
# Apache VHOST configuration file
# Automatically generated by ZPanel 10.0.1
# Generated on: 09:15 13th Dec 2012 CET
################################################################
NameVirtualHost *:80
# Configuration for ZPanel control panel.
<VirtualHost *:80>
ServerAdmin zadmin#localhost
DocumentRoot "/etc/zpanel/panel/"
ServerName cp.zpanel.com
ServerAlias *.cp.zpanel.com
AddType application/x-httpd-php .php
<Directory "/etc/zpanel/panel/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Custom settings are loaded below this line (if any exist)
</VirtualHost>
################################################################
# ZPanel generated VHOST configurations below.....
################################################################
# DOMAIN: new.domain.com
<virtualhost *:80>
ServerName new.domain.com
ServerAlias new.domain.com www.new.domain.com
ServerAdmin zadmin#localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/new_domain_com"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/new_domain_com:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_$
ErrorLog "/var/zpanel/logs/domains/zadmin/new.domain.com-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/new.domain.com-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/new.domain.com-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI -Indexes
</location>
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)
# Custom VH settings (if any exist)
</virtualhost>
# END DOMAIN: new.domain.com
################################################################
##ETC other domains##
/etc/hosts
### Hetzner Online AG installimage
# nameserver config
# IPv4
127.0.0.1 localhost
6.8.81.52 Ubuntu-1210-quantal-64-minimal
#
# IPv6
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Check the permissions of httpd-vhosts.conf file. Maybe you don't have write permission.

Resources