我在 apache2 Ubuntu 上管理两个虚拟主机时遇到问题。
以下是我的 /var/www 上的结构
- Owncloud
- 门户网站
我的故事板是这样的:我想创建一个拥有 owncloud 服务的 Web 门户。门户的 IP 是:http://192.168.5.222
。我想给 owncloud 提供地址https://192.168.5.222
。
所以我创建了两个.conf/etc/apache2/sites-available
门户配置文件
<*虚拟主机 *:80>
ServerAdmin [email protected] ServerName 192.168.5.222 ServerAlias tresnamuda.local DocumentRoot /var/www/portal ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
<*/虚拟主机>
Owncloud.conf
<*虚拟主机 *:443>
####SSL 配置 ##### SSLCertificateFile /etc/apache2/ssl/owncloud.pem 上的 SSLEngine SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key #### SSL 配置结束 ####
DocumentRoot /var/www/owncloud/
<目录 /var/www/owncloud> 选项索引 FollowSymLinks AllowOverride 全部要求全部授予 </目录> <*/虚拟主机>
您知道,我是从这些参考资料中学习如何安装 owncloud 的:菜鸟实验室. 在 http:成功。但是在 https: owncloud 上出现了这样的错误:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
这是我的 apache2.conf:
# Global configuration
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Allow from all
</Directory>
<Directory /var/www/portal>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
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
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
任何帮助或建议我都非常感谢。