Dear All,
I run the OpenKM with Nginx as a reverse proxy and it work just fine. But when I use the server to work with another application I face the problem with Nginx configuration. I'm not sure if it could be done or not. Here's the story:
Thanks,
Tio
I run the OpenKM with Nginx as a reverse proxy and it work just fine. But when I use the server to work with another application I face the problem with Nginx configuration. I'm not sure if it could be done or not. Here's the story:
- I install the OpenKM in /opt/openkm
- In Nginx sites-enabled I have : openkm with below configuration:
Code: Select all
server { server_name portal.webserver.com; rewrite ^/$ /OpenKM/ permanent; location /OpenKM/ { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:8080/OpenKM/; } } - From that point I can access portal.webserver.com and then got redirected to portal.webserver.com/OpenKM/
- Then I add another webserver call it : portal with below configuration:
Code: Select all
server { listen 80; root /var/www/; index index.php index.html index.htm; server_name portal.webserver.com; location / { try_files $uri $uri/ /index.php; } location ~ \.php$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:81; } location ~ /\.ht { deny all; } } - What I want to achieve is when I type http://portal.webserver.com it will display the portal home which is served by Apache via port 81
- and when I type http://portal.webserver.com/OpenKM it will display portal.webserver.com/OpenKM which is served by tomcat via port 8080
- Unfortunately I got no luck because I think those configuration is totally wrong but I don't now how to achieve it.
Thanks,
Tio
