I’m back guys! lol And with good news!
I managed to solve the problem of Creating Multiple Hosts in Apache.
It took a bit of work to understand but it worked.
It looked like this ( /etc/httpd/sites-available/site.com.conf ):
<VirtualHost *:80>
ServerName site1.com
ServerAlias site1.com
JkMount /* site1
CustomLog "/var/log/httpd/site1.com-access_log" combined
ErrorLog "/var/log/httpd/site1.com-error_log"
RewriteCond %{SERVER_NAME} =site1.com [OR]
RewriteCond %{SERVER_NAME} =site1.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
< /VirtualHost>
<VirtualHost *:443>
ServerName site1.com
ServerAlias site1.com
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/site1.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/site1.com/privkey.pem
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) “wss://[site1.com]:[127.0.0.10]/$1” [P,L]
ProxyPreserveHost on
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Port 443
ProxyPass / “ws://127.0.0.10:8000/” retry=5
ProxyPassReverse / “ws://127.0.0.10:8000/” retry=5
< /VirtualHost>
< /IfModule >
Together with the /etc/httpd/conf/workers.properties file, which looked like this:
worker.ajp13.loadbalancer.workers=site1
worker.site1.type=ajp13
worker.site1.host=127.0.0.10
worker.site1.port=8009
After restarting the java service (site1) that I created in the /opt/site1/ directory
With *.arj file and *.conf config
and link to /etc/init.d/ with site1.
That was the summary, to be able to create multiple virtual hosts.
I created site1.com (127.0.0.10) and site2.com 127.0.0.9) everything ok!
I appreciate everyone’s help for trying to help me and for helping me.
Thank you very much!
RESOLVED!