http - Listen to multiple port httpd fedora -
how set httpd listen multiple port in apache ports.conf
i wanted add virtual host available on ports
edit default config file:
vim /etc/httpd/conf/httpd.conf <-- requires root privileges
and add:
listen 80 listen 81 .... listen 8x
now, vhosts:
<virtualhost *:80> servername server1 <-- needs in /etc/hosts file documentroot /var/www/project1 </virtualhost> <virtualhost *:81> servername server2 <-- needs in /etc/hosts file documentroot /var/www/project2 </virtualhost>
after this, make sure restart httpd:
/etc/init.d/httpd restart <-- requires root privileges
finally, access 2 sites like: http://server1:80
, http://server2:81
update: fedora requires update selinux policy, allowing httpd access non-default ports (like 90, instance):
semanage port -a -t http_port_t -p tcp 90 <-- requires root privileges
Comments
Post a Comment