我对安装在/var/www/html中的Openproject、Apache和其他应用程序有问题。
当我尝试连接到/var/www/html甚至index.html中的任何应用程序时,它都无法工作,因为它看起来像是Openproject conf文件正在将流量重定向到另一个文件夹(我猜是openproject文件夹)。
这是我的Openproject.conf
Include /etc/openproject/addons/apache2/includes/server/*.conf
<VirtualHost *:80>
ServerName tools.mydomain.com
DocumentRoot /opt/openproject/public
ProxyRequests off
Include /etc/openproject/addons/apache2/includes/vhost/*.conf
# Can't use Location block since it would overshadow all the other proxypass directives on CentOS
ProxyPass /openproject/ http://127.0.0.1:6000/openproject/ retry=0
ProxyPassReverse /openproject/ http://127.0.0.1:6000/openproject/
</VirtualHost>下面是我的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
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet当我将openproject.conf中的ServerName更改为tools.mydomain.com以外的任何内容时,我可以访问/var/www/html中的应用程序,但我不知道这是如何工作的……我不明白阿帕奇的工作方式是这样的。
谢谢你的帮助。
发布于 2019-01-09 00:13:19
这是旧的线程,但我有相同的问题,因为我已经安装了OpenProject,我所有的其他VHOST停止工作。如果我禁用OP,那么所有其他的都可以正常工作。
我通过将OP ServerName更改为op-dev并将port从*:80更改为*:81来修复它,并且应该在文件中执行此操作的一个重要位置:
/etc/openproject/addons/apache2/includes/server/20_repoman_svn_vhost.conf
在这里,您还应该更改:
"VirtualHost 127.0.0.1:80“to "VirtualHost *:80"和
ServerName可以保持本地主机。
现在,所有VHOST都工作正常。
发布于 2016-10-25 03:12:10
请注意端口80,因为它在大多数应用程序中非常常见。首先,尝试重新加载apache。
sudo service apache2 reload接下来,如果这给出了错误,请查看输出。
sudo journalctl -xe如果一切正常,注册站点
sudo a2ensite openproject再次重新加载apache,并将以下行添加到/etc/hosts文件
127.0.1.1 tools.mydomain.com然后,尝试进入http://tools.mydomain.com:[port]
发布于 2019-07-20 02:14:24
你所需要做的就是修复这个字符串:
DocumentRoot /opt/openproject/public指向您的根目录/var/www/html/
https://stackoverflow.com/questions/40127857
复制相似问题