Merge pull request #1846 from mnoorenberghe/docker_vhost

Use misc/apache.conf instead of utils/docker/apache-vhost in docker
This commit is contained in:
Isaac Connor 2017-04-06 08:41:21 -04:00 committed by GitHub
commit b4ac277ecb
4 changed files with 14 additions and 16 deletions

View File

@ -43,7 +43,7 @@ ADD utils/docker/start.sh /tmp/start.sh
RUN chown -R www-data:www-data /usr/local/share/zoneminder/ RUN chown -R www-data:www-data /usr/local/share/zoneminder/
# Adding apache virtual hosts file # 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 ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini
# Expose http ports # Expose http ports

View File

@ -5,13 +5,22 @@
# Some values may need to manually adjusted to suit your setup # Some values may need to manually adjusted to suit your setup
# #
<VirtualHost *:80> <VirtualHost *:80>
ServerName @WEB_HOST@
ServerAdmin webmaster@localhost ServerAdmin webmaster@localhost
DocumentRoot "@WEB_PREFIX@" DocumentRoot "@WEB_PREFIX@"
Alias /zm/ "@WEB_PREFIX@/"
<Directory "@WEB_PREFIX@"> <Directory "@WEB_PREFIX@">
Options -Indexes +FollowSymLinks Options -Indexes +FollowSymLinks
AllowOverride All 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> </Directory>
ScriptAlias /cgi-bin "@CGI_PREFIX@" ScriptAlias /cgi-bin "@CGI_PREFIX@"

View File

@ -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>

View File

@ -27,6 +27,9 @@ mysql -u root < db/zm_create.sql
# Add the ZoneMinder DB user # 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';" 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 # Activate CGI
a2enmod cgi a2enmod cgi