简体   繁体   中英

How to add a ProxyPassReverse to apache2

I want to use sockets. I'm using this package:

https://github.com/tlaverdure/laravel-echo-server

because my domain name has a SSL I should add this config:

https://github.com/tlaverdure/laravel-echo-server#alternative-ssl-implementation

RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
RewriteCond %{QUERY_STRING} transport=websocket    [NC]
RewriteRule /(.*)           ws://localhost:6001/$1 [P,L]

ProxyPass        /socket.io http://localhost:6001/socket.io
ProxyPassReverse /socket.io http://localhost:6001/socket.io

I don't know where is place of my apache2 config. I'm using centos 7.

locate httpd

/etc/httpd
/etc/apache2/conf/httpd.conf
/etc/apache2/conf/httpd.conf.datastore
/etc/chkserv.d/httpd
/etc/httpd/conf.d
/etc/sysconfig/httpd
/etc/systemd/system/multi-user.target.wants/httpd.service
/etc/yum/universal-hooks/multi_pkgs/posttrans/ea-__WILDCARD__/020-rebuild-httpdc                                                onf
/etc/yum/universal-hooks/multi_pkgs/posttrans/ea-__WILDCARD__/500-restartsrv_htt                                                pd
/etc/yum/universal-hooks/pkgs/glibc/posttrans/100-glibc-restartsrv_httpd
/opt/cpanel/nghttp2/share/man/man1/nghttpd.1
/root/.cpanel/datastore/_usr_sbin_httpd_-L
/root/.cpanel/datastore/_usr_sbin_httpd_-V
/root/.cpanel/datastore/_usr_sbin_httpd_-l
/root/.cpanel/datastore/_usr_sbin_httpd_-v
/usr/include/bind9/isc/httpd.h
/usr/lib/netdata/conf.d/go.d/lighttpd.conf
/usr/lib/netdata/conf.d/go.d/lighttpd2.conf
/usr/lib/netdata/conf.d/health.d/lighttpd.conf
/usr/lib/systemd/system/httpd.service
/usr/local/apache/bin/httpd
/usr/local/apache/conf/httpd.conf
/usr/local/apache/conf/httpd.conf.old.1572008655
/usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Plack/Middleware/Lightt                                                pdScriptNameFix.pm
/usr/local/cpanel/3rdparty/php/73/lib/php/docs/horde/lighttpd-horde.conf
/usr/local/cpanel/3rdparty/php/73/lib/php/docs/kronolith/lighttpd-kronolith.conf
/usr/local/cpanel/3rdparty/php/73/lib/php/docs/nag/lighttpd-nag.conf
/usr/local/cpanel/3rdparty/php/73/lib/php/docs/trean/lighttpd-trean.conf
/usr/local/cpanel/base/frontend/paper_lantern/mimeicons/application-x-httpd-php.                                                png
/usr/local/cpanel/base/frontend/paper_lantern/mimeicons/httpd
/usr/local/cpanel/base/frontend/paper_lantern/mimeicons/httpd-unix-directory.png
/usr/local/cpanel/base/frontend/paper_lantern/mimeicons/_notes/httpd-unix-direct                                                ory.png.mno
/usr/local/cpanel/base/frontend/paper_lantern/mimeicons/httpd/unix-directory.jpg
/usr/local/cpanel/base/frontend/paper_lantern/mimeicons/httpd/unix-directory.png
/usr/local/cpanel/bin/chmodhttpdconf
/usr/local/cpanel/etc/init/scripts/centos/httpd
/usr/local/cpanel/scripts/buildhttpdconf
/usr/local/cpanel/scripts/doomhttpd
/usr/local/cpanel/scripts/rebuildhttpdconf
/usr/local/cpanel/scripts/restartsrv_httpd
/usr/local/cpanel/src/chkservd/chkserv.d/httpd
/usr/local/cpanel/whostmgr/docroot/templates/rebuildhttpdconf.tmpl
/usr/sbin/httpd
/usr/share/aclocal/ax_prog_httpd.m4
/usr/share/doc/ea-apache24-2.4.43/httpd-dav.conf
/usr/share/doc/ea-apache24-2.4.43/httpd-default.conf
/usr/share/doc/ea-apache24-2.4.43/httpd-languages.conf
/usr/share/doc/ea-apache24-2.4.43/httpd-manual.conf
/usr/share/doc/ea-apache24-2.4.43/httpd-mpm.conf
/usr/share/doc/ea-apache24-2.4.43/httpd-multilang-errordoc.conf
/usr/share/doc/ea-apache24-2.4.43/httpd-vhosts.conf
/usr/share/logwatch/scripts/shared/applyhttpdate
/usr/share/man/man8/httpd.8.gz
/var/cpanel/template_compiles/usr/local/cpanel/whostmgr/docroot/templates/rebuil                                                dhttpdconf.tmpl
/var/cpanel/version/cpanel86_ZC-6051_remove_extra_httpd_service_file

update 2

# ps -ef | grep httpd
nobody    7837 20327  0 12:24 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8329 20327  0 12:25 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8633 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8639 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8648 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8649 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8658 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8660 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
mydomain  8744 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8752 20327  0 12:26 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8985 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    8987 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9005 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9014 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9028 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9046 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9047 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9048 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
nobody    9049 20327  0 12:27 ?        00:00:00 /usr/sbin/httpd -k start
root      9056 19251  0 12:27 pts/0    00:00:00 grep --color=auto httpd
root     20327     1  0 Jul11 ?        00:02:01 /usr/sbin/httpd -k start

I changed my domain name to mydomain .

Generally rpm configuration path is /etc/httpd . You can use locate command to check path ie locate httpd

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM