Apache VirtualHost and localhost

后端 未结 11 1047
广开言路
广开言路 2020-12-07 09:48

I\'m working with XAMPP on Mac OS X.

I\'m trying to run a Symfony website properly for a client, and I really don\'t know Symfony (yet). I just want to install and la

11条回答
  •  感动是毒
    2020-12-07 10:37

    This worked for me!

    To run projects like http://localhost/projectName

    
       ServerAdmin localhost
        DocumentRoot path/to/htdocs/
        ServerName localhost
    
    

    To run projects like http://somewebsite.com locally

    
         ServerAdmin webmaster@example.com
         DocumentRoot /path/to/htdocs/somewebsiteFolder
         ServerName www.somewebsite.com
         ServerAlias somewebsite.com
    
    

    Same for other websites

    
         ServerAdmin webmaster@example.com
         DocumentRoot /path/to/htdocs/anotherSiteFolder
         ServerName www.anothersite.local
         ServerAlias anothersite.com
    
    

提交回复
热议问题