CentOS Httpd Reverse Proxy Using VirtualHost

Make modifications to file /etc/httpd/conf/httpd.conf by adding the following lines to it:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName ncw0116.com
ProxyRequests off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
Then restart httpd:sudo /etc/init.d/httpd restart , you could visit your new website by omitting the port number 8080. I could also call the upper method as port forwarding.

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...