0

I'd like to be able to share websites I'm developing with other users in my network using Web Sharing. I don't develop in my 'Sites' folder though, I have a separate folder for all my projects.

(Note: web sharing is working generally. If I visit http://[my-local-ip-address]/~[myusername] it shows the default local Site that I never touch.)

e.g. I use apache's httpd-vhosts.conf file and /etc/hosts to setup local domains that can be accessed by me like so:

http://mytestsite

So.. can I configure OS X Lion & apache to allow other to see them around the LAN like this?

http://[my-local-ip-address]/~mytestsite

Thanks! Ben

2 Answers 2

1

Yes, you can configure Mac OS X 10.7, aka Lion, to serve multiple web sites using URLs like http://[my-local-ip-address]/~mytestsite.

The format of URL you suggest can be achieved by creating a new user for each site, and storing the web pages in that user's Sites folder.

Alternatively, you could create subfolders within your site's folder:

  • http://[my-local-ip-address]/~[myusername]/site1
  • http://[my-local-ip-address]/~[myusername]/site2
  • http://[my-local-ip-address]/~[myusername]/site3

Going another step further, you can customise the Apache httpd 2 configuration files at /etc/apache2/users/[myusername] to tweak the set up to your exact needs.

1

If you have all of the projects in a single folder just set Apache's DocumentRoot in /etc/apache2/httpd.conf to directory.

Or you can just put the project folders in /Library/WebServer/Documents.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .