My WordPress page dies if I remove the port in the URL (Ubuntu Server)

45 Views Asked by At

I have a problem with my WordPress page in which, as it appears in the title, if I remove the port from the URL, my page dies. To explain better, it is something like this:

www.MyPage.com:8091 (the page is still alive) www.MyPage.com (page dies)

As such I already checked my Vhost and according to me they are well configured as well as I changed the URL directly in the wordpress control panel and the only thing that does that is also kill the page, I also checked my Haproxy (I am using a load balancer) As I also suspected everything seems to be correct and finally I tried both assigning the desired URL through the wp-config file and doing it through the database and nothing worked...

What I want as such is that I can access my WordPress site without the URL having the port in view, so the URL looks like this:

www.MyPage.com instead of www.MyPage.com:8091

I'm going to leave part of the Vhost and Haproxy configuration files that I think may be relevant...

VHOST:

<VirtualHost *:8090>
        ServerName pepitocorps.com
        ServerAlias www.pepitocorps.com
        DocumentRoot /var/www/html/wordpress2
        <Directory /var/www/html/wordpress2>
                Options +FollowSymlinks
                AllowOverride All
                Require all granted
        </Directory>
        ErrorLog /var/log/apache2/wp-error_log
        CustomLog /var/log/apache2/wp-access_log common
</VirtualHost>

HAproxy (partial):

frontend http_front
   bind *:80
   redirect scheme https code 301 if !{ ssl_fc }
   default_backend wordpress

frontend https
  bind *:443 ssl crt /etc/ssl/private/pepitocorps.com.pem

  acl wordpress_site hdr(host) -i www.pepitocorps.com
  use_backend wordpress if wordpress_site

  acl proxy hdr(host) -i ww2.pepitocorps.com
  use_backend proxy_html if proxy

  http-request set-header X-Forwarded-Proto https if { ssl_fc }
  http-request add-header SSL on if { ssl_fc }

  default_backend wordpress

backend wordpress
   balance roundrobin
   server server1 localhost:8091 check

backend proxy_html
   server server2 localhost:8090 check


frontend stats
  mode http
  bind *:8505
  stats enable
  stats uri /stats
  stats refresh 10

As such I no longer know what to do, I would appreciate it if someone could give me a hand :/

0

There are 0 best solutions below