修改000-default.conf时Apache2关闭
当我遵循安装应用程序maarchrm的指南时。要求在配置文件“000 default.conf”中包含以下行:修改000-default.conf时Apache2关闭,apache,file,configuration,Apache,File,Configuration,当我遵循安装应用程序maarchrm的指南时。要求在配置文件“000 default.conf”中包含以下行: # Application Maarch RM Include /var/www/laabs/data/maarchRM/conf/vhost.conf 但是当我把它放到配置文件中时;我不能再重新启动apache了。只有在删除添加到文件“000 default.conf”中的行时,我才能重新启动apache 这是000-default.conf文件的代码: <
# Application Maarch RM
Include /var/www/laabs/data/maarchRM/conf/vhost.conf
但是当我把它放到配置文件中时;我不能再重新启动apache了。只有在删除添加到文件“000 default.conf”中的行时,我才能重新启动apache
这是000-default.conf文件的代码:
<VirtualHost *:80>
# 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 www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
# LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
# Include conf-available/serve-cgi-bin.conf
# Application Maarch RM
Include /var/www/laabs/data/maarchRM/conf/vhost.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
#ServerName指令设置请求方案、主机名和端口
#服务器使用来标识自身。这在创建时使用
#重定向URL。在虚拟主机的上下文中,服务器名
#指定必须在请求的主机:标头中显示的主机名
#匹配此虚拟主机。对于默认虚拟主机(此文件),此
#该值不是决定性的,因为它被用作最后的宿主。
#但是,必须为任何其他虚拟主机显式设置它。
#服务器名www.example.com
服务器管理员webmaster@localhost
DocumentRoot/var/www/html
#可用日志级别:trace8、…、trace1、调试、信息、通知、警告、,
#错误、暴击、警报、紧急情况。
#还可以为特定应用程序配置日志级别
#模块,例如。
#日志级别信息ssl:警告
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
#对于conf/available/中的大多数配置文件
#在全局级别启用或禁用,可以
#仅包含一个特定虚拟主机的行。例如
#以下行仅为此主机启用CGI配置
#在使用“A2F”全局禁用后。
#包括conf available/service-cgi-bin.conf
#应用Maarch RM
包括/var/www/laabs/data/maarchRM/conf/vhost.conf
#vim:syntax=apachets=4sw=4sts=4srnoet
vhost.conf:
# APP MaarchRM - Records Management
<VirtualHost *:80>
# Chemin vers le répertoire public web de Laabs
DocumentRoot /var/www/laabs/web/
# Nom du vhost (identique au nom associé à l'adresse IP dans le fichier host)
ServerName maarchrm
Options -Indexes
Options FollowSymLinks
# DirectoryIndex dynamic.php
# Rewrite URLs to route to frontal scripts
# when target is not an existing public resource
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_URI} ^/public [NC]
RewriteRule .* - [QSA,L]
# Rewrite to dynamic frontal if no file extension
# input: /route?args...
# output : http.php/route?args...
RewriteRule ^(.*)$ /http.php [QSA,L]
# Set environment variables for the application instance
SetEnv LAABS_INSTANCE_NAME maarchRM
SetEnv LAABS_APP maarchRM
SetEnv LAABS_BUNDLES recordsManagement;documentManagement;digitalResource;medona;financialRecords;organization;audit;lifeCycle;archivesPubliques;contact;seda;auth;businessRecords
# SetEnv LAABS_EXTENSIONS
SetEnv LAABS_DEPENDENCIES repository;xml;html;localisation;datasource;sdo;json;fileSystem;authentication;logger;authorization
SetEnv LAABS_PRESENTATION maarchRM
SetEnv LAABS_CONFIGURATION "../data/maarchRM/conf/configuration.ini"
SetEnv LAABS_LOG "../data/maarchRM/log.txt"
SetEnv LAABS_TMP_DIR "../data/maarchRM/tmp"
SetEnv LAABS_CONTENT_TYPES "url:application/x-www-form-urlencoded;html:text/html,application/xhtml+xml;xml:application/xml;json:application/json,application/javascript;soap:application/soap+xml;csv:text/csv"
#SetEnv LAABS_CONTENT_LANGUAGES "fr:fr,fr-fr,fr-ca"
SetEnv LAABS_CACHE_CONTROL "public, max-age=3600"
#SetEnv LAABS_EXCEPTION_HANDLER
#SetEnv LAABS_ERROR_HANDLER
SetEnv LAABS_DATE_FORMAT "d-m-Y"
SetEnv LAABS_TIMESTAMP_FORMAT "Y-m-d\TH:i:s,u\Z"
SetEnv LAABS_NUMBER_DECIMALS 2
SetEnv LAABS_DEFAULT_URI recordsManagement/welcome/welcomePage
SetEnv LAABS_ERROR_URI recordsManagement/welcome/error
SetEnv LAABS_CRYPT_KEY mySecretKey
SetEnv LAABS_CRYPT_CIPHER MCRYPT_BLOWFISH
SetEnv LAABS_XML_NS "seda:fr:gouv:culture:archivesdefrance:seda:v1.0;medona:org:afnor:medona:1.0"
</VirtualHost>
#应用程序MaarchRM-记录管理
#公共图书馆管理网(Chemin vers le répertoire public web de Laabs)
DocumentRoot/var/www/laabs/web/
#姓名(姓名识别协会地址IP地址地址主机)
服务器名maarchrm
选项-索引
选项如下符号链接
#DirectoryIndex dynamic.php
#重写URL以路由到脚本
#当目标不是现有的公共资源时
重新启动发动机
RewriteCond%{DOCUMENT\u ROOT}%{REQUEST\u FILENAME}-f[或]
RewriteCond%{REQUEST_URI}^/public[NC]
重写规则。*-[QSA,L]
#如果没有文件扩展名,则重写为动态文件
#输入:/route?参数。。。
#输出:http.php/route?args。。。
重写规则^(.*)$/http.php[QSA,L]
#为应用程序实例设置环境变量
SetEnv LAABS_实例_名称maarchRM
SetEnv LAABS_应用程序maarchRM
SetEnv LAABS_捆绑包记录管理;文件管理;数字资源;梅多纳;财务记录;组织机构;审计;生命周期;公共档案馆;接触;赛达;auth;商业记录
#SetEnv LAABS_扩展
SetEnv LAABS_依赖项存储库;xml;html;本地化;数据源;sdo;json;文件系统;认证;记录器;授权
SetEnv LAABS_演示文稿maarchRM
SetEnv LAABS_配置“./data/maarchRM/conf/CONFIGURATION.ini”
SetEnv LAABS_LOG“./data/maarchRM/LOG.txt”
SetEnv LAABS_TMP_DIR.“./数据/maarchRM/TMP”
SetEnv LAABS_CONTENT_type“url:application/x-www-form-urlencoded;html:text/html,application/xhtml+xml;xml:application/xml;json:application/json,application/javascript;soap:application/soap+xml;csv:text/csv”
#SetEnv LAABS_内容_语言“fr:fr,fr-fr,fr-ca”
SetEnv LAABS_缓存_控制“公共,最大年龄=3600”
#SetEnv LAABS\u异常\u处理程序
#SetEnv LAABS\u错误\u处理程序
SetEnv LAABS_日期_格式“d-m-Y”
SetEnv LAABS_时间戳_格式“Y-m-d\TH:i:s,u\Z”
SetEnv LAABS_数_小数2
SetEnv LAABS\u DEFAULT\u URI记录管理/欢迎/欢迎页面
SetEnv LAABS\u错误\u URI记录管理/欢迎/错误
SetEnv LAABS_CRYPT_KEY mySecretKey
SetEnv LAABS_CRYPT_CIPHER MCRYPT_河豚
SetEnv LAABS_XML_NS“seda:fr:gouv:culture:archivesdefrance:seda:v1.0;medona:org:afnor:medona:1.0”
我希望你有解决这个问题的办法。
提前感谢在您的default.conf中评论这些行
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
在每行前面加一个#
#ServerAdmin webmaster@localhost
#DocumentRoot /var/www/html
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
然后再次重新启动apache。这应该能奏效
控制000-default.conf是否如下所示(代码位于完全相同的位置)
#ServerName指令设置请求方案、主机名和端口
#服务器使用来标识自身。这在创建时使用
#重定向URL。在虚拟主机的上下文中,服务器名
#指定必须在请求的主机:标头中显示的主机名
#匹配此虚拟主机。对于默认虚拟主机(此文件),此
#该值不是决定性的,因为它被用作最后的宿主。
#但是,必须为任何其他虚拟主机显式设置它。
#服务器名www.example.com
#服务器管理员webmaster@localhost
#DocumentRoot/var/www/html
#可用日志级别:trace8、…、trace1、调试、信息、通知、警告、,
#错误、暴击、警报、紧急情况。
#还可以为特定应用程序配置日志级别
#模块,例如。
#日志级别信息ssl:警告
#ErrorLog${APACHE_LOG_DIR}/error.LOG
#CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
#对于conf/available/中的大多数配置文件
#在全局级别启用或禁用,可以
#仅包含一个特定虚拟主机的行。例如
#以下行仅为此主机启用CGI配置
#在使用“A2F”全局禁用后。
#包括conf available/service-cgi-bin.conf
#应用Maarch RM
选项索引如下SYMLINKS包括ExecCGI
允许超越所有
要求所有授权
通融
#vim:syntax=apachets=4sw=4sts=4srnoet
包括/var/www/laabs/data/maarchRM/conf/vhost.conf
<VirtualHost *:80>
# 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 www.example.com
#ServerAdmin webmaster@localhost
#DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
# LogLevel info ssl:warn
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
# Include conf-available/serve-cgi-bin.conf
# Application Maarch RM
<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Include /var/www/laabs/data/maarchRM/conf/vhost.conf