Can I use VirtualHostX to run websites outside the Site folder?
I would like to know if I can run a website which is located outside my Site folder.
For example, I want to run one of my sites inside a Dropbox folder, so I can work with my colleagues and keep my project up to date.
And at the same time, I still needing to access my websites on the mac original Sites folder to other projects.
So far, what I understood was that I can only use VirtualHostX for folders that are inside my Sites directory, right?
I hope you understand what I'm asking :)
Cheers
For example, I want to run one of my sites inside a Dropbox folder, so I can work with my colleagues and keep my project up to date.
And at the same time, I still needing to access my websites on the mac original Sites folder to other projects.
So far, what I understood was that I can only use VirtualHostX for folders that are inside my Sites directory, right?
I hope you understand what I'm asking :)
Cheers
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?All your sites must be nested under a single folder. That's a limitation of Apache as far as I know.
-
Inappropriate?You can serve multiple directories in Apache. You'll need to edit you Apache configuration first. The easiest way is to create a new file in
/etc/apache2/other/nameddropbox.conf(you'll need to enter your password to edit this directory). Next add the following code (replacing the path with the location of the directory you want to serve from Dropbox):
{Directory "/Users/Leroy/Dropbox/Sites/"}
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
{/Directory}
Note: This comment form sanitizes code...replace "{" with "<" and "}" with ">"
Now add your virtual hosts for this folder in VHX like normal. When you apply the changes in VHX, Apache will restart and should pick up the changes.
1 person says
this answers the question
-
Inappropriate?Doesn't this also require that the directory be readable and executable by the Apache user?
-
Inappropriate?Yes, the new folder will need permissions to be able to work with Apache.
Loading Profile...



EMPLOYEE
