Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php docker上的Magento 2-未加载css_Php_Css_Magento_Docker_Magento2 - Fatal编程技术网

Php docker上的Magento 2-未加载css

Php docker上的Magento 2-未加载css,php,css,magento,docker,magento2,Php,Css,Magento,Docker,Magento2,我使用composer安装了magento: composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition 并加载样本数据。 它在本地主机上运行得非常好 我为magento创建了dockerfile和docker compose: Dockerfile: FROM ubuntu:latest MAINTAINER xxxx RUN apt-get -q

我使用composer安装了magento:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
并加载样本数据。 它在本地主机上运行得非常好

我为magento创建了dockerfile和docker compose: Dockerfile:

FROM ubuntu:latest

MAINTAINER xxxx

RUN apt-get -qqy update

RUN apt-get -qqy install apache2 \
        php \
        mysql-client \
        libapache2-mod-php \
        php-pear \
        php-mcrypt \
        php-gd \
        php-curl \
        php-mysql \
        php-dom \
        php-xml \
        php-xsl \
        php-mbstring \
        php-intl \
        php-zip \
        php-cli \
        php-cgi \
        curl \
        git \
        nano \
        vim \
        htop
RUN apt-get -qqy install nodejs npm
RUN apt-get -qqy install php-fpm

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

ADD ./20-mcrypt.ini /etc/php/7.0/cli/conf.d/20-mcrypt.ini
ADD ./20-mcrypt.ini /etc/php/7.0/apache2/conf.d/20-mcrypt.ini


RUN a2enmod rewrite

COPY ./magento2.conf /etc/apache2/sites-available/magento2.conf
#RUN rm -f /etc/apache2/sites-enabled/000-default.conf

#COPY xdebug-enabler.ini /etc/php/7.0/mods-available/

RUN php -r "echo ini_get('memory_limit').PHP_EOL;"

COPY ./apache2.conf /etc/apache2/apache2.conf

RUN a2enmod php7.0
RUN service apache2 restart


WORKDIR /var/www/html

EXPOSE 9001
EXPOSE 80
EXPOSE 443
magento2.conf:

<VirtualHost *:80>
       DocumentRoot /var/www/html
       ServerName magento2test.localhost
       <Directory /var/www/html>
        DirectoryIndex index.php index.html
            Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            allow from all
       </Directory>
</VirtualHost>
现在它只是一个图像,因为我使用远程mysql,我以后会添加更多图像

不管怎样,我可以建立和建立docker。 我能够安装和设置magento。 当然,我尝试了刷新所有缓存,并完成了所有这些命令(使用docker exec-it container_name bash:

php  bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento setup:upgrade --keep-generated
php bin/magento module:enable --all
php bin/magento setup:di:compile
但是style.css和一些js没有加载属性:

system.log:

[2016-11-17 07:27:39] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2ae0e2a835d549823c9720ea0833000d3 and handles default, catalog_category_view, catalog_category_view_type_default, catalog_category_view_type_default_without_children, catalog_category_view_id_39: Please correct the XML data and try again.  [] []
[2016-11-17 07:27:39] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2a7ccd8094436548b564a588f6303121c and handles 2columns-left: Please correct the XML data and try again.  [] []
[2016-11-17 07:27:40] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_26f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again.  [] []
当我尝试更改docker容器上项目的权限时,它将不会应用。 可能是因为窗户的缘故吧

你有什么想法吗?我能修好吗?

我终于解决了

下面是我的Apache/php Dockerfile:

FROM ubuntu:latest

MAINTAINER Konrad Siamro

RUN apt-get -qqy update

RUN apt-get -qqy install apache2 \
        php \
        mysql-client \
        libapache2-mod-php \
        php-pear \
        php-mcrypt \
        php-gd \
        php-curl \
        php-mysql \
        php-dom \
        php-xml \
        php-xsl \
        php-mbstring \
        php-intl \
        php-zip \
        php-cli \
        php-cgi \
        curl \
        git \
        nano \
        vim \
        htop

RUN apt-get -qqy install php-soap

RUN apt-get -qqy install bindfs \
    dos2unix \
    php-xdebug

RUN apt-get -qqy install nodejs npm
RUN apt-get -qqy install php-fpm

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY ./20-mcrypt.ini /etc/php/7.0/cli/conf.d/20-mcrypt.ini
COPY ./20-mcrypt.ini /etc/php/7.0/apache2/conf.d/20-mcrypt.ini

RUN a2enmod rewrite

COPY ./magento2.conf /etc/apache2/sites-available/magento2.conf
#RUN rm -f /etc/apache2/sites-enabled/000-default.conf

COPY ./xdebug-enabler.ini /etc/php/7.0/mods-available/xdebug.ini
COPY ./auth.json /var/www/auth.json

RUN php -r "echo ini_get('memory_limit').PHP_EOL;"

COPY ./apache2.conf /etc/apache2/apache2.conf

RUN a2enmod php7.0

RUN echo "extension=php_openssl.dll" >> /etc/php/7.0/apache2/php.ini

RUN service apache2 restart

WORKDIR /var/www/html

COPY ./ssh /var/ssh

EXPOSE 9001
EXPOSE 80
EXPOSE 443

COPY ./start_safe_perms.sh /usr/local/bin/start_safe_perms.sh
RUN dos2unix /usr/local/bin/start_safe_perms.sh
RUN chmod 777 /usr/local/bin/start_safe_perms.sh
CMD ["/bin/bash", "/usr/local/bin/start_safe_perms.sh"]
和apache2配置文件:

# this is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#   /etc/apache2/
#   |-- apache2.conf
#   |   `--  ports.conf
#   |-- mods-enabled
#   |   |-- *.load
#   |   `-- *.conf
#   |-- conf-enabled
#   |   `-- *.conf
#   `-- sites-enabled
#       `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/>
    Options +Indexes +FollowSymLinks +Multiviews
    allowOverride  all
    Require all granted
</Directory>

#<Directory /srv/>
#   Options Indexes FollowSymLinks
#   AllowOverride None
#   Require all granted
#</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>



# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
#这是Apache服务器的主配置文件。它包含
#为服务器提供指令的配置指令。
#看http://httpd.apache.org/docs/2.4/ 有关
#关于特定于Debian的指令和/usr/share/doc/apache2/README.Debian
#提示。
#
#
#Apache2配置如何在Debian中工作的摘要:
#Debian中的Apache2Web服务器配置与
#upstream建议的配置web服务器的方法。这是因为Debian
#默认Apache2安装尝试添加和删除模块,
#虚拟主机,以及尽可能灵活的额外配置指令
#以便尽可能轻松地自动化更改和管理服务器
#可能。
#它被分割成几个文件,形成所概述的配置层次结构
#下面的所有文件都位于/etc/apache2/目录中:
#
#/etc/apache2/
#|--apache2.conf
#|`--ports.conf
#|--mods已启用
#| 124;--*.装载
#|`-*.conf
#|--conf已启用
#|`-*.conf
#`--已启用站点
#`-*.conf
#
#
#*apache2.conf是主配置文件(此文件)。它将
#在启动时包括所有剩余的配置文件
#网络服务器。
#
#*ports.conf始终包含在主配置文件中
#应该确定传入连接的侦听端口,这些端口可以
#随时定制。
#
#*mods enabled/、conf enabled/和sites enabled中的配置文件/
#目录包含管理模块的特定配置代码段,
#全局配置片段或虚拟主机配置,
#分别。
#
#它们通过将其上的可用配置文件符号链接来激活
#各自的*-可用/副本。应使用我们的
#助手a2enmod/a2dismod、a2ensite/a2disconf和a2enconf/a2disconf。请参阅
#有关详细信息,请参阅各自的手册页。
#
#*二进制文件称为apache2。由于使用了环境变量,在
#默认配置apache2需要使用启动/停止
#/etc/init.d/apache2或apache2ctl。直接调用/usr/bin/apache2不会
#使用默认配置。
#全局配置
#
#
#ServerRoot:目录树的顶部,服务器的
#保留配置、错误和日志文件。
#
#注意!如果要将其放置在NFS(或其他网络)上
#然后请阅读互斥文件系统文档(可用
#at);
#你会省去很多麻烦。
#
#不要在目录路径的末尾添加斜杠。
#
#ServerRoot“/etc/apache2”
#
#接受序列化锁定文件必须存储在本地磁盘上。
#
互斥文件:${APACHE\u LOCK\u DIR}默认值
#
#PidFile:服务器应在其中记录其进程的文件
#启动时的标识号。
#这需要在/etc/apache2/envvars中设置
#
PidFile${APACHE_PID_文件}
#
#超时:接收和发送超时之前的秒数。
#
超时300
#
#KeepAlive:是否允许持久连接(超过
#每个连接一个请求)。设置为“关闭”将停用。
#
继续
#
#MaxKeepAliverRequests:允许的最大请求数
#在持续连接期间。设置为0以允许无限量。
#我们建议您将此数字保持在较高水平,以获得最佳性能。
#
MaxKeepAliveRequests 100
#
#KeepAliveTimeout:等待来自的下一个请求的秒数
#同一连接上的同一客户端。
#
保持超时
#这些需要在/etc/apache2/envvars中设置
用户${APACHE\u RUN\u User}
组${APACHE\u RUN\u Group}
#
#HostnameLookups:记录客户机的名称或仅记录其IP地址
#例如,www.apache.org(开)或204.62.129.132(关)。
#默认设置是关闭的,因为如果人们
#必须故意打开此功能,因为启用它意味着
#每个客户端请求将导致至少一个对客户端的查找请求
#名称服务器。
#
主机名查询
#ErrorLog:错误日志文件的位置。
#如果未在中指定ErrorLog指令
#容器中,将显示与该虚拟主机相关的错误消息
#在此处登录。如果您*确实*为
#容器,该主机的错误将记录在那里而不是这里。
#
ErrorLog${APACHE_LOG_DIR}/error.LOG
#
#日志级别:控制记录到错误日志的消息的严重性。
#可用值:trace8、…、trace1、调试、信息、通知、警告、,
#错误、暴击、警报、紧急情况。
#还可以为特定模块配置日志级别,例如。
#“日志级别信息ssl:警告”
#
日志级别警告
#包括模块配置:
包括可选mods启用/*.加载
IncludeOptional mods enabled/*.conf
#包括要侦听的端口列表
Include ports.conf
#设置Apache2 HTTPD服务器的默认安全模型
#不允许访问/usr/share和/var/www之外的根文件系统。
#前者由Debian中打包的web应用程序使用,
#后者可用于本地目录
FROM ubuntu:latest

MAINTAINER Konrad Siamro

RUN apt-get -qqy update

RUN apt-get -qqy install apache2 \
        php \
        mysql-client \
        libapache2-mod-php \
        php-pear \
        php-mcrypt \
        php-gd \
        php-curl \
        php-mysql \
        php-dom \
        php-xml \
        php-xsl \
        php-mbstring \
        php-intl \
        php-zip \
        php-cli \
        php-cgi \
        curl \
        git \
        nano \
        vim \
        htop

RUN apt-get -qqy install php-soap

RUN apt-get -qqy install bindfs \
    dos2unix \
    php-xdebug

RUN apt-get -qqy install nodejs npm
RUN apt-get -qqy install php-fpm

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

COPY ./20-mcrypt.ini /etc/php/7.0/cli/conf.d/20-mcrypt.ini
COPY ./20-mcrypt.ini /etc/php/7.0/apache2/conf.d/20-mcrypt.ini

RUN a2enmod rewrite

COPY ./magento2.conf /etc/apache2/sites-available/magento2.conf
#RUN rm -f /etc/apache2/sites-enabled/000-default.conf

COPY ./xdebug-enabler.ini /etc/php/7.0/mods-available/xdebug.ini
COPY ./auth.json /var/www/auth.json

RUN php -r "echo ini_get('memory_limit').PHP_EOL;"

COPY ./apache2.conf /etc/apache2/apache2.conf

RUN a2enmod php7.0

RUN echo "extension=php_openssl.dll" >> /etc/php/7.0/apache2/php.ini

RUN service apache2 restart

WORKDIR /var/www/html

COPY ./ssh /var/ssh

EXPOSE 9001
EXPOSE 80
EXPOSE 443

COPY ./start_safe_perms.sh /usr/local/bin/start_safe_perms.sh
RUN dos2unix /usr/local/bin/start_safe_perms.sh
RUN chmod 777 /usr/local/bin/start_safe_perms.sh
CMD ["/bin/bash", "/usr/local/bin/start_safe_perms.sh"]
# this is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#   /etc/apache2/
#   |-- apache2.conf
#   |   `--  ports.conf
#   |-- mods-enabled
#   |   |-- *.load
#   |   `-- *.conf
#   |-- conf-enabled
#   |   `-- *.conf
#   `-- sites-enabled
#       `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/>
    Options +Indexes +FollowSymLinks +Multiviews
    allowOverride  all
    Require all granted
</Directory>

#<Directory /srv/>
#   Options Indexes FollowSymLinks
#   AllowOverride None
#   Require all granted
#</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>



# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet