View previous topic :: View next topic |
Author |
Message |
rawbeefman Guru
Joined: 25 Mar 2005 Posts: 375
|
Posted: Thu Oct 23, 2014 1:44 pm Post subject: Adding Virtual Host for Zoneminder (Apache Configuration) |
|
|
Great reference here: https://forums.gentoo.org/viewtopic-t-993482-highlight-apache.html
However, since I configured Apache last, it seems to have changed. So at some point, I would like to access this externally. And I would like to follow the appropriate steps to configure an endpoint (I think in the past, I used a common host with many website, eg. 192.168.1.100/mysite_1).
So, looking into setting up a virtual host, here: http://wiki.gentoo.org/wiki/Apache#Configuration
.... But the syntax seems to differ from the sample config file that shipped with Zoneminder:
Code: |
ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms"
ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms"
<Directory "/usr/libexec/zoneminder/cgi-bin">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /zoneminder "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
Options -Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
|
I just copied that to /etc/apache2/vhosts.d and gave the apache user ownership rights.
If I attempt to browse to 192.168.1.100/Zoneminder, I get a Not Found.
Browsing to 192.168.1.100 gives me a 'It works!'
Hopefully an Apache expert can tell me what I am doing wrong.
Thanks again, everyone, for your help!
This is probably beneficial:
Code: |
tuxServer ~ # tail /var/log/apache2/error_log
[Thu Oct 23 04:08:29 2014] [error] [client 192.168.1.12] File does not exist: /var/www/localhost/htdocs/zoneminder
[Thu Oct 23 04:09:42 2014] [notice] caught SIGTERM, shutting down
[Thu Oct 23 04:09:44 2014] [notice] Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1j configured -- resuming normal operations
[Thu Oct 23 04:10:02 2014] [error] [client 192.168.1.12] Directory index forbidden by Options directive: /usr/share/zoneminder/www/
[Thu Oct 23 04:14:24 2014] [error] [client 192.168.1.12] Directory index forbidden by Options directive: /usr/share/zoneminder/www/
[Thu Oct 23 04:40:36 2014] [error] [client 192.168.1.12] File does not exist: /var/www/localhost/htdocs/Zoneminder
[Thu Oct 23 04:41:42 2014] [notice] caught SIGTERM, shutting down
[Thu Oct 23 04:41:45 2014] [notice] Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1j configured -- resuming normal operations
[Thu Oct 23 04:41:52 2014] [error] [client 192.168.1.12] File does not exist: /var/www/localhost/htdocs/Zoneminder
[Thu Oct 23 04:42:21 2014] [error] [client 192.168.1.12] File does not exist: /var/www/localhost/htdocs/Zoneminder
|
|
|
Back to top |
|
|
katfish Tux's lil' helper
Joined: 14 Nov 2011 Posts: 147
|
Posted: Mon Nov 03, 2014 11:45 pm Post subject: |
|
|
It looks like the apache user cannot access /usr/libexec/zoneminder/* - make sure it can r+x in that directory. |
|
Back to top |
|
|
rawbeefman Guru
Joined: 25 Mar 2005 Posts: 375
|
Posted: Tue Nov 04, 2014 9:38 pm Post subject: |
|
|
Thank you, yes; this was ultimately a permissions error. |
|
Back to top |
|
|
WWWW Tux's lil' helper
Joined: 30 Nov 2014 Posts: 143
|
Posted: Tue Dec 09, 2014 8:57 am Post subject: |
|
|
katfish wrote: | It looks like the apache user cannot access /usr/libexec/zoneminder/* - make sure it can r+x in that directory. |
How?
Do you mean doing:
Code: | chown -R apache:apache /usr/libexec/zoneminder/ |
I never understood why the folder /usr/libexec/zoneminder/cgi-bin[/b. My crude solution was to copy both [b]zms and nph-zms into:
Code: | /var/www/localhost/cgi-bin/ |
And assumed that virtual host supplied by zoneminder was broken.
Alright, to confirm that apache works, (I am not an expert in apache or web servers), the syntax in virtual host is perfectly legal?
Code: |
ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms"
ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms"
<Directory "/usr/libexec/zoneminder/cgi-bin"> |
Because now I have a mixed of things that are confusing in order to understand how falls into place. As aboved mentioned my virtual host points to a different place but apache is still able to use /var/www/localhost/cgi-bin/. How is this possible?
Moreover, both directories seem to have identical permissions.
danke schon!
PS: if so much work and fixing needs to be done after install, isn't this the job of the ebuild? |
|
Back to top |
|
|
WWWW Tux's lil' helper
Joined: 30 Nov 2014 Posts: 143
|
Posted: Sun Dec 14, 2014 9:58 pm Post subject: Bump |
|
|
Anyone? |
|
Back to top |
|
|
WWWW Tux's lil' helper
Joined: 30 Nov 2014 Posts: 143
|
Posted: Wed Dec 17, 2014 5:19 pm Post subject: |
|
|
I would love if somebody could give a hint. I am not an apache expert. |
|
Back to top |
|
|
|