Redirect Apache to Tomcat on Vesta CP

Multi tool use
up vote
0
down vote
favorite
I have a VPS server with Ubuntu 18 O.S. In this VPS I have installed VESTA CP, which comes with Apache 2 and Nginx. After that I have intalled Tomcat 9(port 8082) to serve a Java Spring based webapp.
If I enter the address "serverIP:8082/AppFolder" I can access the app, but I want to redirect the apache server to the tomcat one, so I can write the domain name and load the webapp.
I have tried .htaccess file but it shows an apache error page. I have no permission to view this file is the message.
What can I do to solve this?
-Nginx config:
location / gz
location /error/
alias /home/admin/web/webapp.com/document_errors/;
location @fallback
proxy_pass http://IP:8080;
-Apache config:
<VirtualHost IP:8080>
ServerName webapp.com
ServerAlias www.webapp.com
ServerAdmin info@webapp.com
DocumentRoot /home/admin/web/webapp.com/public_html
ScriptAlias /cgi-bin/ /home/admin/web/webapp.com/cgi-bin/
Alias /vstats/ /home/admin/web/webapp.com/stats/
Alias /error/ /home/admin/web/webapp.com/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/webapp.com.bytes bytes
CustomLog /var/log/apache2/domains/webapp.com.log combined
ErrorLog /var/log/apache2/domains/webapp.com.error.log
<Directory /home/admin/web/webapp.com/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/webapp.com/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/webapp.com/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
IncludeOptional /home/admin/conf/web/apache2.webapp.com.conf*
</VirtualHost>
Thanks.
java apache tomcat nginx vesta
add a comment |
up vote
0
down vote
favorite
I have a VPS server with Ubuntu 18 O.S. In this VPS I have installed VESTA CP, which comes with Apache 2 and Nginx. After that I have intalled Tomcat 9(port 8082) to serve a Java Spring based webapp.
If I enter the address "serverIP:8082/AppFolder" I can access the app, but I want to redirect the apache server to the tomcat one, so I can write the domain name and load the webapp.
I have tried .htaccess file but it shows an apache error page. I have no permission to view this file is the message.
What can I do to solve this?
-Nginx config:
location / gz
location /error/
alias /home/admin/web/webapp.com/document_errors/;
location @fallback
proxy_pass http://IP:8080;
-Apache config:
<VirtualHost IP:8080>
ServerName webapp.com
ServerAlias www.webapp.com
ServerAdmin info@webapp.com
DocumentRoot /home/admin/web/webapp.com/public_html
ScriptAlias /cgi-bin/ /home/admin/web/webapp.com/cgi-bin/
Alias /vstats/ /home/admin/web/webapp.com/stats/
Alias /error/ /home/admin/web/webapp.com/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/webapp.com.bytes bytes
CustomLog /var/log/apache2/domains/webapp.com.log combined
ErrorLog /var/log/apache2/domains/webapp.com.error.log
<Directory /home/admin/web/webapp.com/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/webapp.com/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/webapp.com/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
IncludeOptional /home/admin/conf/web/apache2.webapp.com.conf*
</VirtualHost>
Thanks.
java apache tomcat nginx vesta
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a VPS server with Ubuntu 18 O.S. In this VPS I have installed VESTA CP, which comes with Apache 2 and Nginx. After that I have intalled Tomcat 9(port 8082) to serve a Java Spring based webapp.
If I enter the address "serverIP:8082/AppFolder" I can access the app, but I want to redirect the apache server to the tomcat one, so I can write the domain name and load the webapp.
I have tried .htaccess file but it shows an apache error page. I have no permission to view this file is the message.
What can I do to solve this?
-Nginx config:
location / gz
location /error/
alias /home/admin/web/webapp.com/document_errors/;
location @fallback
proxy_pass http://IP:8080;
-Apache config:
<VirtualHost IP:8080>
ServerName webapp.com
ServerAlias www.webapp.com
ServerAdmin info@webapp.com
DocumentRoot /home/admin/web/webapp.com/public_html
ScriptAlias /cgi-bin/ /home/admin/web/webapp.com/cgi-bin/
Alias /vstats/ /home/admin/web/webapp.com/stats/
Alias /error/ /home/admin/web/webapp.com/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/webapp.com.bytes bytes
CustomLog /var/log/apache2/domains/webapp.com.log combined
ErrorLog /var/log/apache2/domains/webapp.com.error.log
<Directory /home/admin/web/webapp.com/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/webapp.com/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/webapp.com/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
IncludeOptional /home/admin/conf/web/apache2.webapp.com.conf*
</VirtualHost>
Thanks.
java apache tomcat nginx vesta
I have a VPS server with Ubuntu 18 O.S. In this VPS I have installed VESTA CP, which comes with Apache 2 and Nginx. After that I have intalled Tomcat 9(port 8082) to serve a Java Spring based webapp.
If I enter the address "serverIP:8082/AppFolder" I can access the app, but I want to redirect the apache server to the tomcat one, so I can write the domain name and load the webapp.
I have tried .htaccess file but it shows an apache error page. I have no permission to view this file is the message.
What can I do to solve this?
-Nginx config:
location / gz
location /error/
alias /home/admin/web/webapp.com/document_errors/;
location @fallback
proxy_pass http://IP:8080;
-Apache config:
<VirtualHost IP:8080>
ServerName webapp.com
ServerAlias www.webapp.com
ServerAdmin info@webapp.com
DocumentRoot /home/admin/web/webapp.com/public_html
ScriptAlias /cgi-bin/ /home/admin/web/webapp.com/cgi-bin/
Alias /vstats/ /home/admin/web/webapp.com/stats/
Alias /error/ /home/admin/web/webapp.com/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/webapp.com.bytes bytes
CustomLog /var/log/apache2/domains/webapp.com.log combined
ErrorLog /var/log/apache2/domains/webapp.com.error.log
<Directory /home/admin/web/webapp.com/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/webapp.com/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/webapp.com/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
IncludeOptional /home/admin/conf/web/apache2.webapp.com.conf*
</VirtualHost>
Thanks.
java apache tomcat nginx vesta
java apache tomcat nginx vesta
asked Nov 10 at 18:50
Pedro
456
456
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Finally I have found an answer...editing the config file of nginx:
proxy_pass http://IP:8082; <--TOMCAT PORT
root /home/admin/web/webapp.com/public_html; <--JSP PAGES PATH
Default config file has the Apache port and apache html pages path.
I suppose this can be done using apache proxy_mod, but I don´t know which way is better...if anyone can explain the two ways(via apache or via nginx) I apreciate it.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Finally I have found an answer...editing the config file of nginx:
proxy_pass http://IP:8082; <--TOMCAT PORT
root /home/admin/web/webapp.com/public_html; <--JSP PAGES PATH
Default config file has the Apache port and apache html pages path.
I suppose this can be done using apache proxy_mod, but I don´t know which way is better...if anyone can explain the two ways(via apache or via nginx) I apreciate it.
add a comment |
up vote
0
down vote
Finally I have found an answer...editing the config file of nginx:
proxy_pass http://IP:8082; <--TOMCAT PORT
root /home/admin/web/webapp.com/public_html; <--JSP PAGES PATH
Default config file has the Apache port and apache html pages path.
I suppose this can be done using apache proxy_mod, but I don´t know which way is better...if anyone can explain the two ways(via apache or via nginx) I apreciate it.
add a comment |
up vote
0
down vote
up vote
0
down vote
Finally I have found an answer...editing the config file of nginx:
proxy_pass http://IP:8082; <--TOMCAT PORT
root /home/admin/web/webapp.com/public_html; <--JSP PAGES PATH
Default config file has the Apache port and apache html pages path.
I suppose this can be done using apache proxy_mod, but I don´t know which way is better...if anyone can explain the two ways(via apache or via nginx) I apreciate it.
Finally I have found an answer...editing the config file of nginx:
proxy_pass http://IP:8082; <--TOMCAT PORT
root /home/admin/web/webapp.com/public_html; <--JSP PAGES PATH
Default config file has the Apache port and apache html pages path.
I suppose this can be done using apache proxy_mod, but I don´t know which way is better...if anyone can explain the two ways(via apache or via nginx) I apreciate it.
answered Nov 11 at 17:17
Pedro
456
456
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242303%2fredirect-apache-to-tomcat-on-vesta-cp%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
XvMxnZmHsn,z64Pik6,iabrqv0s3P5B4ZTGgM13 GqCI9fh7akMq0q7XpqJ2vGqN4oqBCEoDn9w,Xgl