apache proxypass question - service unavailable

Issues related to applications and software problems
Post Reply
mcheoti
Posts: 36
Joined: 2016/02/13 10:07:42
Location: Austria
Contact:

apache proxypass question - service unavailable

Post by mcheoti » 2017/02/23 18:37:29

Hi everybody, i have a quick question and maybe you can answer this.
I have Apache/2.4.6 (CentOS) running and some applications. I have an appliacation running on port 1880.
I am able the access the app under http://localhost:1880/ works.

I implemented a Proxy pass in the httpd restarted the service and the application but when I try to access
http://localhost/ch/ I got the error message

Code: Select all

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
I am sure this is a config issue, because I can access the application wirh http://localhost:1880/ ,
Here is the Virtual Host from my httpd.conf

Code: Select all

<VirtualHost *:80>
ServerName 127.0.0.1
<IfModule mod_proxy.c>
  ProxyPass /ch/ http://127.0.0.1:1880/ retry=0 timeout=5
  ProxyPassReverse /ch/ http://127.0.0.1:1880/
</ifModule>
</VirtualHost>
I used the Apache Doc, but maybe I missed something. Any ideas ?
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html

All the best

User avatar
TrevorH
Forum Moderator
Posts: 29493
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: apache proxypass question - service unavailable

Post by TrevorH » 2017/02/23 18:46:25

Do you have entries in your apache logs for this? If you didn't specify a log file then most likely in /var/log/httpd/error_log
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

larwood
Posts: 60
Joined: 2011/07/27 12:07:30
Location: Perth WA, Australia

Re: apache proxypass question - service unavailable

Post by larwood » 2017/02/24 07:05:24

Do you have SELinux enabled? Check your SELinux logs.

You may need to enable the port:

Code: Select all

semanage port -a -t http_port_t -p tcp 1880
Or you can enable the boolean so httpd can connect to the network

Code: Select all

setsebool -P httpd_can_network_connect on

mcheoti
Posts: 36
Joined: 2016/02/13 10:07:42
Location: Austria
Contact:

Re: apache proxypass question - service unavailable

Post by mcheoti » 2017/03/11 09:35:11

Hi All,

i found a solution.
This is the working configuration with a websocket. As example when you want to do that with Node Red

Code: Select all

<VirtualHost *:80>
  ServerName 127.0.0.1
 <IfModule mod_proxy.c>
  ProxyPass "/nr/comms"  "ws://localhost:1880/comms"
  ProxyPass /nr/ http://127.0.0.1:1880/ retry=0 timeout=5
  ProxyPassReverse /nr/ http://127.0.0.1:1880/
</ifModule>
</VirtualHost>

Post Reply

Return to “CentOS 7 - Software Support”