To enable VirtualHosts, we need to make some changes in Apache Configuration file (nf).Pankajs-MacBook-Pro: root# vi /etc/apache2/nfUncomment below lines and save it.# Virtual hostsInclude /private/etc/apache2/extra/nfNow when Apache will load the configuration file, it will also load the virtual hosts configuration file. We can proceed now to HTTPD virtual hosts file.Pankajs-MacBook-Pro: root# vi /etc/apache2/extra/nfAdd following configuration for a new VirtualHost and save it.ServerAdmin '/Users/pankaj/CODE/'ServerName ServerAlias '/private/var/log/apache2/-errorlog'CustomLog '/private/var/log/apache2/-accesslog' commonAllowOverride AllOrder allow,denyAllow from allMake sure to change the DocumentRoot, ServerName and Directory location according to your needs.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |