0
我想在我的Ubuntu 14.04 LTS配置文件中爲我的虛擬主機創建配置,因此我修改了文件/etc/apache2/sites-available/mysite.com.conf,如下所示:反向代理Apache Tomcat Web應用程序
# domain: mysite.com
# public: /var/www/mysite.com/public_html/
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin [email protected]
ServerName www.mysite.com
ServerAlias mysite.com
ProxyPass/http://139.333.222.107:8080/devices
ProxyPassReverse/http://139.333.222.107:8080/devices
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/mysite.com/public_html
# Log file locations
LogLevel warn
ErrorLog /var/www/mysite.com/log/error.log
CustomLog /var/www/mysite.com/log/access.log combined
</VirtualHost>
但是當我運行sudo service apache2 restart
,我得到這個錯誤:
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 9 of /etc/apache2/sites-enabled/mysite.com.conf:
Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.