Reverse Proxy sometime does not load in different browsers
Posted: 06. May 2019 17:21
Hi,
I have installed the odoo 12 community on ubuntu 18.10 running apache2. The server is hosted on a Vultr vps. I have the DNS setup with NameCheap. The server run fine when I entered the following in the browser URL xxx.xxx.xxx.xxx:8069 (xxx.xxx.xxx.xxx say is my server ip). Then I set up the reverse proxy in apache2 so that the user can enter www.mysite.com or mysite.com without specifying the port ":8069" in the url.
The problem is that the website failed to load some time if I used www.mysite.com or mysite.com. But when I entered www.mysite.com:8069 or mysite.com:8069. It loaded every time without failure. I tried on Chrome, Firefox, Safari, Edge. The failure is more often on Firefox and Chrome.
Here's the config file (/etc/apache2/sites-available/mysite.conf):
<VirtualHost *.*>
ServerName mysite.com
ServerAlias www.mysite.com
LogLevel warn
ErrorLog /var/log/apache2/mysite.com error.log
CustomLog /var/log/apache2/mysite.access.log combined
ProxyRequests Off
ProxyPass / http://xxx.xxx.xxx.xxx:8069/ retry=0
ProxyPassReverse / http://xxx.xxx.xxx.xxx:8069/
</VirtualHost>
The error from
a) Chrome
Cannot find www.mysite.com web page
HTTP ERROR 404
In the developer console:
Failed to load resource: www.mysite.com/:1
the server responded with a status of 404 (Not Found)
b) Edge
HTTP 404
c) Firefox
HTTP 404
I checked /var/log/apache2. Not of the files in there has been written to after the error occurred.
Does anyone encounter this problem? What did I do wrong? Please advise.
Thank you.
Simon Lee
I have installed the odoo 12 community on ubuntu 18.10 running apache2. The server is hosted on a Vultr vps. I have the DNS setup with NameCheap. The server run fine when I entered the following in the browser URL xxx.xxx.xxx.xxx:8069 (xxx.xxx.xxx.xxx say is my server ip). Then I set up the reverse proxy in apache2 so that the user can enter www.mysite.com or mysite.com without specifying the port ":8069" in the url.
The problem is that the website failed to load some time if I used www.mysite.com or mysite.com. But when I entered www.mysite.com:8069 or mysite.com:8069. It loaded every time without failure. I tried on Chrome, Firefox, Safari, Edge. The failure is more often on Firefox and Chrome.
Here's the config file (/etc/apache2/sites-available/mysite.conf):
<VirtualHost *.*>
ServerName mysite.com
ServerAlias www.mysite.com
LogLevel warn
ErrorLog /var/log/apache2/mysite.com error.log
CustomLog /var/log/apache2/mysite.access.log combined
ProxyRequests Off
ProxyPass / http://xxx.xxx.xxx.xxx:8069/ retry=0
ProxyPassReverse / http://xxx.xxx.xxx.xxx:8069/
</VirtualHost>
The error from
a) Chrome
Cannot find www.mysite.com web page
HTTP ERROR 404
In the developer console:
Failed to load resource: www.mysite.com/:1
the server responded with a status of 404 (Not Found)
b) Edge
HTTP 404
c) Firefox
HTTP 404
I checked /var/log/apache2. Not of the files in there has been written to after the error occurred.
Does anyone encounter this problem? What did I do wrong? Please advise.
Thank you.
Simon Lee