Set Non-Domain Access Processing
Set Non-Domain Access Processing
Test Environment
- Test OS : CentOS 7.2
- Test Version : IBM HTTPServer v8.5
apache httpd.conf setting
tip You can set it up on the web server of the Apache class.
Forward to the virtual host that is error-handling for non-domain specified.
The point is not to give a serverName value to a dummy virtual host.
Listen 80
Listen 4958
NameVirtualHost *:80
NameVirtualHost *:4958
<VirtualHost *:80>
DocumentRoot /app/was/htdocs
ErrorDocument 403 "해당 방식은 접근이 허용되지 않은 방식입니다."
ErrorDocument 404 "해당 방식은 접근이 허용되지 않은 방식입니다."
ErrorDocument 500 "해당 방식은 접근이 허용되지 않은 방식입니다."
</VirtualHost>
<VirtualHost *:4958>
DocumentRoot /app/was/htdocs
ErrorDocument 403 "해당 방식은 접근이 허용되지 않은 방식입니다."
ErrorDocument 404 "해당 방식은 접근이 허용되지 않은 방식입니다."
ErrorDocument 500 "해당 방식은 접근이 허용되지 않은 방식입니다."
</VirtualHost>
ProxyRequests Off
<VirtualHost *:80>
ServerName test.apache.com
ProxyPass / http://172.31.98.155/ Keepalive=on
ProxyPassReverse / http://172.31.98.155/
ProxyPreserveHost On
#LogLevel debug
ErrorLog /app/was/HTTPServer/logs/test_proxy_error.log
CustomLog /app/was/HTTPServer/logs/test_proxy_access.log combined
</VirtualHost>
<VirtualHost *:4958>
ServerName test.httpserver.com
ProxyPass / http://172.31.98.209/ Keepalive=on
ProxyPassReverse / http://172.31.98.209/
ProxyPreserveHost On
#LogLevel debug
ErrorLog /app/was/HTTPServer/logs/http_proxy_error.log
CustomLog /app/was/HTTPServer/logs/http_proxy_access.log combined
</VirtualHost>
0 Comments:
댓글 쓰기