2016-10-19 5 views
0

У меня проблема с Openproject, Apache и другими приложениями, которые установлены в/var/www/html.Openproject, apache и/var/www/html

Когда я пытаюсь подключиться к любому приложению в/var/www/html или даже index.html, он не работает, потому что он выглядит так: файл Openproject conf перенаправляет трафик в другую папку (я думаю, ,

Вот мой 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 [email protected] 
     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 

Когда я изменить ServerName в openproject.conf к чему-либо другому, чем tools.mydomain.com Я могу получить доступ к приложениям в/var/www/html, но я не могу понять, как это работает ... Я не понимаю, как работает apache так.

Спасибо за вашу помощь.

ответ

0

Будьте осторожны с портом 80, поскольку он очень распространен для большинства приложений. Сначала попробуйте перезагрузить apache.

sudo service apache2 reload 

Далее, см. Выход, если это дает ошибку.

sudo journalctl -xe 

Если все в порядке, зарегистрировать сайт

sudo a2ensite openproject 

Reload апачский снова и добавьте в/и т.д./хосты файл следующую строку

127.0.1.1 tools.mydomain.com 

Затем попытайтесь войти на http://tools.mydomain.com:[port]

+0

Не уверен, что я понял свое первое сообщение. Я ** могу ** получить доступ к openproject с моим конфигурационным файлом. Однако я не могу получить доступ к другим приложениям в '/ var/www/html /'. – Tom

+0

нет, это потому, что вам нужно создать другие домены для этого – maxwellnewage