Mibew / mibew

Mibew Messenger - open-source live support application
https://mibew.org
Other
472 stars 204 forks source link

Wrong URLs generated when Mibew sits on port diferent from 80 #186

Closed JustBlackBird closed 7 years ago

JustBlackBird commented 7 years ago

I'm trying to install Mibew behind nginx working as a proxy. In my setup both nginx and Apache (which is used for mibew) are installed at the same server. Apache listens to port 8080 and nginx listens to port 80. Here are configs (don't think they are usefull but so):

Apache:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

nginx:

server {
    listen 80;

    location / {
        proxy_pass http://localhost:80;
    }
}

The problem is Mibew generates all URLs in absolute format with 8000 port instead of 80. Here is an example of a URL:

http://example.com:8000/mibew/styles/pages/default/css/default.css

And here is what I expect to get:

http://example.com:80/mibew/styles/pages/default/css/default.css

Or even (keeping in mind that 80 is default HTTP port):

/mibew/styles/pages/default/css/default.css

Of course URLs started with http://example.com:8000 cannot be served properly because only 80 port is available from outside of the server.

playcraft1 commented 7 years ago

Check out #188

faf commented 7 years ago

Fixed by #194