我不知道爲什麼當我訪問我的GWT應用程序時,我總是收到「404請求的資源不可用」。我目前正在我的TomEE/8.5.6(7.0.2)上託管我的GWT應用程序。GWT應用程序獲取「404請求的資源不可用」
這是情況。
我能夠用我的GWT應用程序從 「TomEE Web應用程序管理器」 爲(HTTP)://192.168.1.70:8080 /指數
但是,當我輸入(HTTP): //www.zethanath.tk在瀏覽器中,我會得到(HTTPS)://www.zethanath.tk/與HTTP狀態404
這裏是我的配置的細節。
Ubuntu:/opt/tomcat/webapps$ ls -l
total 20932
drwxrwxr-x 14 tomcat tomcat 4096 Aug 4 11:46 docs
drwxrwxr-x 5 tomcat tomcat 4096 Aug 4 11:46 host-manager
drwxrwxrwx 5 tomcat tomcat 4096 Aug 25 08:46 Index
-rwxrwxrwx 1 tomcat tomcat 21411520 Aug 25 08:46 Index.war
drwxrwxr-x 5 tomcat tomcat 4096 Aug 4 11:46 manager
drwxrwxr-x 3 tomcat tomcat 4096 Aug 8 17:30 ROOT
sudo的納米000-default.conf
<VirtualHost *:80 >
Protocols h2 http/1.1
ServerAdmin [email protected]
ServerName www.zethanath.tk
ServerAlias servlet.zethanath.tk zethanath.tk
DocumentRoot "/opt/tomcat/webapps/Index"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.zethanath.tk
RewriteRule^https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
sudo的納米默認的ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
Protocols h2 http/1.1
ServerAdmin [email protected]
ServerName www.zethanath.tk
ServerAlias servlet.zethanath.tk zethanath.tk
DocumentRoot "/opt/tomcat/webapps/Index"
JKMountCopy On
JKMount /* ajp13_worker
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/zethanath.tk/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/zethanath.tk/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
我一直在想,我需要端口8080 「的DocumentRoot」 關聯/ opt/tomcat/webapps/Index「,但我不確定如何。
這是我的UFW的細節。路由器。
sudo ufw status
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Apache Full ALLOW Anywhere
20/tcp ALLOW Anywhere
21/tcp ALLOW Anywhere
990/tcp ALLOW Anywhere
40000:50000/tcp ALLOW Anywhere
Apache Secure ALLOW Anywhere
8080 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
20/tcp (v6) ALLOW Anywhere (v6)
21/tcp (v6) ALLOW Anywhere (v6)
990/tcp (v6) ALLOW Anywhere (v6)
40000:50000/tcp (v6) ALLOW Anywhere (v6)
Apache Secure (v6) ALLOW Anywhere (v6)
8080 (v6) ALLOW Anywhere (v6)
非常感謝幫助。
如果你不知道什麼我的意思是「暴露整個戰爭」剛剛打開http://localhost/WEB-INF/web.xml與當前的配置。 –
非常感謝您的回覆。另外,有什麼辦法可以堅持Mod JK?我聽說Mod JK更好,所以我從Mod Proxy切換到Mod JK。我不能再切換回來:) – sethanath
另請注意,我在http虛擬主機的末端執行了Mod_rewrite。這篇文章會將用戶重定向到SSL vhost,SSL vhost會使用Mod JK將用戶重定向到GWT應用程序。 – sethanath