Use misc/apache.conf instead of utils/docker/apache-vhost in docker
This avoids duplication and fixes a few things that were missing in the Docker version for modern Apache: * AllowOverride All * Require all granted Deleted `ServerName @WEB_HOST@` since `WEB_HOST` was never defined in ZM code so it would give an Apache error.
This commit is contained in:
parent
badbf1c74c
commit
a1f0ec3ecf
|
@ -43,7 +43,7 @@ ADD utils/docker/start.sh /tmp/start.sh
|
|||
RUN chown -R www-data:www-data /usr/local/share/zoneminder/
|
||||
|
||||
# Adding apache virtual hosts file
|
||||
ADD utils/docker/apache-vhost /etc/apache2/sites-available/000-default.conf
|
||||
RUN cp misc/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini
|
||||
|
||||
# Expose http ports
|
||||
|
|
|
@ -5,13 +5,22 @@
|
|||
# Some values may need to manually adjusted to suit your setup
|
||||
#
|
||||
<VirtualHost *:80>
|
||||
ServerName @WEB_HOST@
|
||||
ServerAdmin webmaster@localhost
|
||||
|
||||
DocumentRoot "@WEB_PREFIX@"
|
||||
Alias /zm/ "@WEB_PREFIX@/"
|
||||
<Directory "@WEB_PREFIX@">
|
||||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride All
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin "@CGI_PREFIX@"
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<VirtualHost *:80>
|
||||
DocumentRoot /usr/local/share/zoneminder/www
|
||||
DirectoryIndex index.php
|
||||
|
||||
ScriptAlias /cgi-bin/ /usr/local/libexec/zoneminder/cgi-bin/
|
||||
<Directory />
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Directory "/usr/local/libexec/zoneminder/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
|
@ -27,6 +27,9 @@ mysql -u root < db/zm_create.sql
|
|||
# Add the ZoneMinder DB user
|
||||
mysql -u root -e "grant insert,select,update,delete,lock tables,alter on zm.* to 'zmuser'@'localhost' identified by 'zmpass';"
|
||||
|
||||
# Make ZM_LOGDIR
|
||||
mkdir /var/log/zm
|
||||
|
||||
# Activate CGI
|
||||
a2enmod cgi
|
||||
|
||||
|
|
Loading…
Reference in New Issue