url - Local sub-domains on httpd apache -


i have on machine wampp server installed use run php applications.

there many folder in htdocs inside projects , can see in browser @ url: localhost/folder-name/.

i'd see every project in custom url like: dev.name-folder.com

with iis easy that, can explain how apache, using wampp server?

thanks.

you can change c:\windows\system32\drivers\etc\hosts file map domain names dev.name-folder.com local system. (otherwise you'll have use dns server).

to configure vhost in apache create file each domain/project you'd serve:

<virtualhost *:80>     serveradmin email@domain.tld     servername domain.tld      documentroot /var/www/htdocs/domain.tld/html     <directory />             options followsymlinks             allowoverride none     </directory>     <directory /var/www/htdocs/domain.tld/html>             options indexes followsymlinks multiviews             allowoverride none             order allow,deny             allow     </directory> </virtualhost> 

servername domain name you'd serve files under. documentroot must set absolute path files (here taken linux system).


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -