Virtual hosts on Mac OS X Leopard with XAMPP

By Benjamin Melançon
on 28 Aug
0 comments

Key words and phrases

vhost virtual hosts Mac OS X 10.5 Apple Macintosh Leopard virtualhosts

Tags

Description

To set this up with xampp on Mac OS X,

vi /Applications/xampp/etc/httpd.conf

And uncomment:

# Virtual hosts
Include /Applications/xampp/etc/extra/httpd-vhosts.conf

For subsequent additions of named hosts to your Apache configuration, start here:
vi /Applications/xampp/etc/extra/httpd-vhosts.conf

Added (following their dummy-host example quite closely)

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "/sites/example/htdocs"
    ServerName example.dev
    ServerAlias www.example.dev
    ErrorLog "logs/example.dev-error_log"
    CustomLog "logs/example.dev-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerName myagaric_svn.dev
    ServerAlias www.myagaric_svn.dev
    ServerAdmin webmaster@localhost
    DocumentRoot "/sites/myagaric_svn/www"
    ErrorLog "logs/myagaric_svn_error.log"
    CustomLog "logs/myagaric_svn_access.log" common
</VirtualHost>

... but some other step is needed for the browser to look there at all, i think. Ah yes, here:
/Users/ben/Documents/Ebony/Web Development/subdomains, multiple domains with virtualhosts.txt
But it's out of date.

In 10.5, the functions typically previously associated with NetInfo Manager have been moved to some Directory nonsense, and the Accounts pane of System Preferences.

But this command still works:

sudo vi /etc/hosts

Added this line:

127.0.0.1       example.dev

 

Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup> <kbd> <s>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.