I have an Apache server, on this server I have a bunch of WordPress websites, and this year I started creating React apps.
I have been able to change :80 for Nginx and :8080 for apache, the problem is that when I change the port in WHM tweaks from 443 to 8443 my WordPress website stop working. And if I leave it default then my Nginx conf send this error nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
The code I'm trying to use for my conf to load the app is
server {
listen *:80;
listen [::]:80;
server_name plitz7.com www.plitz7.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name plitz7.com www.plitz7.com;
root /home/allplitz/plitzseven;
location / {
proxy_pass http://localhost:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_cache_bypass $http_upgrade;
}
ssl_certificate /var/cpanel/ssl/apache_tls/plitz7.latinconstructions.com/combined;
ssl_certificate_key /var/cpanel/ssl/apache_tls/plitz7.latinconstructions.com/combined;
}
Thanks, I hope someone can help me, so far the only solutions I found is to change the port, but then my Apache https website stop working, so I need a solution that can work for both.