Virtual Hosting on Mac OS X
Enter virtualhost.sh -- the most powerful and easy shell script for Mac OS X that sets up a virtualhost into your system. Using NetInfoManager, virtualhost.sh lets you easily create a named virtual host that is only accessible locally.
Here's how to use it:
- Because of what this script does, you must have root privileges. The best way to achieve this is to use sudo.
sudo /path/to/virtualhost.sh <virtualhost>
Example:
sudo /path/to/virtualhost.sh mysiteNote: when you type in the name of your virtualhost, do not include the angled brackets. It is a Unix/command-line convention that denotes a requirement parameter. (Square brackets are used to denote an optional parameter.)Where "/path/to" is the path to where you installed virtualhost.sh ("./virtualhost" will work if you're in the same folder), and <virtualhost> is the name of the virtualhost you want to add. You should pick a one-word name so that it won't interfere with your everyday surfing. For example, if your live site is mysite.com, then you should pick mysite.
- If it's your first time running the script, it's going to ask you if you want to update the DocumentRoot of your webserver to be your Sites folder. It's up to you, but I recommend that you do it.
- Next, it will ask you for the folder name of the site you are setting up. The default is fine, but it gives you the option of changing it.
- Lastly, you will -- oh wait, that's it. At this point, you're done! If you made a mistake at any point, just re-run the script, and you can overwrite an existing configuration.
Update: Do to popular demand (including my own), I have added removal functionality. To remove a virtualhost you've added, run the script like so:
You can install this script wherever you like. I put mine in /usr/local/bin, strictly because of habit from previous Unix systems. I've tried to test this as much as possible, but if you experiencing any problems, drop me a line.
Known limitations:
Several people have asked me if you can use this script to setup a live site. This is currently not possible. The majority of users using this script on their local machine will have a dynamically-assigned IP address. Because Apache's name-based virtualhosting requires you to enter the IP address you're using, a dynamically-assigned address would mean that you would have to update your Apache configuration every time your address changes. Additionally, this script uses NetInfoManager (/Applications/Utilities/NetInfoManager) to make the hostname resolveable. A real IP address with a real hostname does not need an entry in NetInfoManager, and the presense of one could be problematic if the IP address ever changed (I believe NetInfoManager is consulted before a DNS request). At any rate, if you wish to change the default IP address used by the script, you can do a search and replace like so:
That all said, if you do happen to have a hostname and a static or dynamic address that never changes, and you wish to enable a name-based virtualhost, you can do what I do:
- Locate the virtualhost file:
cd /etc/httpd/virtualhosts
- Copy the generated file to a new file:
cp mysite mysite.ext
- Edit the file, and replace the IP address in the <Virtualhost 127.0.0.1> directive with the address you wish to use, and the ServerName mysite with ServerName my.real.hostname.com (where my.real.hostname.com is your real hostname, and not literally what I wrote).
- Edit /etc/httpd/httpd.conf, and add a NameVirtualHost statement right below the one the script originally added (at the bottom of the file):
NameVirtualhost 127.0.0.1... where aaa.bbb.ccc.ddd is the IP address you're using.
NameVirtualHost aaa.bbb.ccc.ddd - Give Apache an ol' restart (apachectl restart) and then type your URL into your browser to make sure it worked.
Several people have asked about donations of some kind. Now of course, this is completely unnecessary, but if you'd still like to show your appreciation somehow, I wouldn't say no to a PayPal donation or Amazon gift. ;)
|
|
Comments
Sounds nice! But does it make backups of the config files it writes? Which ones does it overwrite, only httpd.conf? - Beernd, Tuesday, May 27, 2003 Can this also be used to create: - Johan Kool, Tuesday, May 27, 2003 Just to answer a few questions: 1. No backups are made, because there are so few modifications to /etc/httpd/httpd.conf. The first change, which is optional, is to change the DocumentRoot to your Sites folder. If you choose to do this, it will comment out the original setting. The next addition can be found at the end of the file. Just two lines: "NameVirtualHost 127.0.0.1" and "Include /private/etc/httpd/virtualhosts/". 2. Currently it does not support external virtualhosts due to the dynamic IP addresses that most computers have. You need to have a "NameVirtualHost [IP Address]" line, so you'd have to change this all the time if you get a different IP. - Patrick Gibson, Tuesday, May 27, 2003 I've been looking for an easy way to do this for a long time. Thanks for writing this script. - Justin Makeig, Tuesday, May 27, 2003 To get cgi-scripts working within virtualHosted directories, I had to add this line to my virtualHost file (after the "ServerName" directive): - Jonathan, Tuesday, May 27, 2003 You can download an updated version that includes a configurable DocumentRoot, and a ScriptAlias defined. Enjoy! - Patrick Gibson, Tuesday, May 27, 2003 Nice! one question? Do you have a reverse script for this? I often create a development site when I'm working with a client. Then, once I have them up and running, I archive the development site, then delete the vhost. It would be nice to have a script that does that as easily as your script add them. - dara, Sunday, June 1, 2003 See the "Update:" section above for an answer to this question. - Patrick Gibson, Wednesday, June 4, 2003 Hey, that script is just great! Thank you very much, it makes my life a lot easier!! - Marcel, Sunday, June 8, 2003 THANKS! - Steve Dodds, Thursday, October 9, 2003 beautiful solution. you ended days of agony for me. thank-you. - thankful, Saturday, November 15, 2003 Patrick, thank you for all your help and for your wonderful script! - sox, Tuesday, January 13, 2004 I've installed it, tested it with a non-existant folder (test) and saw the "installation successful" message. However, when I map it to an existing folder with an actual site inside, I always get a "Permission Denied" error when accessing the virtualhost. - Jorge, Sunday, February 15, 2004 Oops! I needed a chmod -R 755 to my sites. Now that we're at it, was that the best way to do it? I've also installed PHP, let's see if I can make it all work! Thanks a lot for this fabulous script!!! - Jorge, Sunday, February 15, 2004 Very cool. It's simple, clean, and it works. Just one little thing: I'd really like to take full advantage of aliasing plus virtual hosts to avoid moving all my project folders into the ~/Sites/ folder. Possible? - dspn, Saturday, February 21, 2004 Hello I don't believe it is impossible to set up apache with a dynamic IP, as stated in this article. Compare: http://www.onlamp.com/pub/a/apache/2004/01/08/apacheckbk.html "Finally, the *:80 syntax indicates that the vhosts will be on all interfaces, on the specified port. This is the simplest syntax for most people. It also has the added advantage that it works for people with dynamic IP addresses, and allows you to move sites from one server to another without having to change the configuration." I haven't figured out, how to do this so far, but I am working on it and if someone has a hint - you are most welcome to help! Thnx. - Daniel Guntli, Saturday, March 6, 2004 Hey this script is cool. We run both PC and Macos X Sytems and until this came along, well, it was just easier to set up a server testing environment on one of the PC. NOT THE CASE NOW THOUGH. This does the trick, like a dream...WELL DONE PATRICK! - Drew Paget, Tuesday, July 20, 2004 Patrick, would it be possible to add a port-based virtual host entry to each file with your script? I manually added one notes here that seems to work pretty well, and allows me to access my sites from other computers on my network despite a changing IP. BTW, I got the idea from This macdevcenter article. Thanks for making such a handy script available! - Nate, Tuesday, September 7, 2004 Sorry, urls lost in my comment there: "notes here" "This macdevcenter article" - Nate, Tuesday, September 7, 2004 That is a genius piece of script! Just saved me hours of messing around with httpd.conf! Thanks!! :o) - J McNamara, Wednesday, September 8, 2004
- timfm, Tuesday, September 14, 2004 Hi Tim, You need to specify the path to the virtualhost.sh script when you run it. If it's in your Sites folder, you would type: sudo ./virtualhost.sh www.splashdesign.dev "." means the current folder. If you want to be able run commands in the current folder no matter where you are, you would add the following line to your ~/.bash_profile file: export PATH=$PATH:. Patrick - Patrick, Tuesday, September 14, 2004 Patrick- Is there a reasonably easy way I can modify where your script is looking for Apache and the httpd.conf files? I've got an Apache2 install as my main production environment running alongside the standard apple install. It's in a folder Apache2 within the mail library... Thanks... - Brendon, Wednesday, September 22, 2004 Why insist that the new virtual host be a subdirectory within Sites? - Martin McDonald, Saturday, November 20, 2004 Hi Martin, I chose the Sites folder as the default location for websites, as to me, it's the most logical. First, it's already there. Second, because it's in your own home folder, the permissions are already set such that you don't have to muck about with ownership, etc. That said, if you did want to change it, open up the script in a text-editor, and uncomment the "DOC_ROOT_PREFIX" variable, and set the path to your ideal location. Patrick - Patrick, Saturday, November 20, 2004 Hi Patrick, Thank you very much for a fantastic script that have made my development work much easier. I have a question, and perhaps I have misunderstood you, but it refers to having Virtual hosts on a local network. I have an old PMacG3 with X.3 on it at a fixed IP of [192.168.0.10], and I am hoping to have a number of fixed virtual hosts there that I can access from my other computers on the local network by using In your post above, it seems to me that it is possible, and I have followed your steps, but I still can’t get it to work. Am I doing something wrong ? or am I trying to achieve the impossible ??? I would be very grateful for any assistance. - Mats, Saturday, December 4, 2004 OK, so I worked out the answer for the question above myself, and wish to share it with everyone else that might be interested. How to access Virtualhosts over the local network 1. Set up your ‘old’ Mac with OS X.3 and give it a fixed IP address in the Network pane of System Preferences. Make sure you can ping / access it using that IP. (I am using 192.168.0.10 in this example)
-- create a new virtual host if you do not have one. (I am using “project1.pmac”) -- in each of your exisiting virtual hosts, open their files from /etc/httpd/virtualhosts/ and change “” to “” -- save and restart Apache. Check that everything works from the local computer (where the virtual hosts are)
4. Open Safari/Firefox and type in the virtual host and you should now see the virtual host site, and everything should work. DISCLAIMER: I am NOT a UNIX expert so IF I have introduced some problems/insecurities, then please let me know. Furthermore, this is only tested with X.3.6 on a local network with a NetGear DG834 router, so your milage may vary. Hope I have helped someone else that has been struggling with this. - Mats, Wednesday, December 8, 2004 Hmm, the submission stripped some stuff there in point 2, so here it is again in a safe (?) format. -- in each of your exisiting virtual hosts, open their files from /etc/httpd/virtualhosts/ and change “<Virtualhost 127.0.0.1>” to “<Virtualhost 192.168.0.10 >” - Mats, Wednesday, December 8, 2004 I was hoping this might fix the problem with Win98 under Virtual PC (7.01) not being able to view the site. But no go. It does, of course, work on XP once you install Rendezvous Development Version - but obviously, it'd be much quicker (and take up MUCH less space on a laptop, given that's the only reason EVER to use VPC anyway) to use Win98. - Malson, Sunday, January 16, 2005 Thanks for the script Patrick, it works fine within my LAN. But I can't get it to work for outsiders. I've got a static IP. Placed it in the mysite-file inside the virtualhosts folder like this: NameVirtualHost static.ip.addres.mac DocumentRoot /Library/WebServer/Documents/www.mysite.nl ServerName www. mysite.nl ScriptAlias /cgi-bin /Library/WebServer/Documents/www. mysite.nl/cgi-bin
- Jan Abrahim Vos, Monday, January 17, 2005 Has anyone had any luck getting this to work with MAMP ? I'm not very good with Unix yet, just got my first mac, and MAMP www.mamp.info is an easy to deploy development server, but when I try to modify the script to point to the MAMP directories, MAMP can no longer start apache2 and things go to hell :( - Jeff B, Friday, February 25, 2005 Lovely script. I have my user located on a partitioned volume. The script stated that the httpdconf was pointing to the wrong place, so I want it to point to username/sites. The result is the creation of a user=me folder under User with a site directory containing the virtual host directory. To sum up it didn't work with the link to a user on another volume. How can I get round that, by making changs ot the script or ot the httpd file? Thanks. - John Plumridge, Wednesday, March 9, 2005 To implement a dynamic IP feature you may check out the command line tool dnsmasq which is listed at osx.hyperjeff.net/Apps !!! - Chris, Tuesday, March 22, 2005 This is great, and I've been happily using it for a while. One issue I've noticed, however, is that if I create a virtual host, the very first one I created takes over the top-level IP (e.g. 127.0.0.1). I would rather have this IP load my Sites folder - is there any way to fix this? - neil, Tuesday, March 29, 2005 Hi, I installed Apache 2 on my Mac yesterday and this ubber cool little app stopped working... Thanks - Frederico, Wednesday, March 30, 2005 I have three sites under dev in my Sites folder. I made three virtualhost place holders for them site1.dev site2.dev etc but all I get when i go to site1.dev in my browser is a directory listing?? - jon, Monday, May 16, 2005 itsorright ! I sorted it. Had to un-edit some previous changes to the httpd.conf... - jon, Monday, May 16, 2005 This was so simple. Thanks alot!!! Is there an easy way to make my virtual host answer to a specific port number? This would make it easy for another machine. - Mike, Tuesday, June 21, 2005 Can't get this to work when I'm stuck behind a secure proxy service. When I switch my location to Home, which is a static IP set up on a small home LAN this works. But when I switch the connection to my work location, which uses the bizarre Japanese (where I live) proxy/firewall set up I get: Any suggestions on how to work around this? - Fred & Lilly Tranfield, Wednesday, July 6, 2005 Hi Fred and Lilly, You need to tell Mac OS X to query your local hosts before trying to resolve. Here's how to do it: sudo bash You may have to quit empty Safari's cache and restart it, and if that doesn't work, restarting your computer ought to fix the problem. - Patrick Gibson, Thursday, July 7, 2005 The other thing to try (maybe first, in fact) is this: go into your System Preferences, into Network, and then Proxies. Locate the box that says "Bypass proxy settings for these Hosts and Domains". I'm not sure what the format is here, but try entering "lan" or ".lan" if that is the convention you use for your virtualhosts. - Patrick Gibson, Thursday, July 7, 2005 Thanks for the script. A couple of things: Despite changing the path to my apache config in the script as instructed, an extra /private was appended before the path in httpd.conf: Quite possibly user error, but a quick delete and it worked fine. I can't seem to get ServerAlias declarations working by manually editing the virtualhosts files. I assume there's some magic going on elsewhere? I noticed a "_localhost" entry was also created that would link localhost to the Sites folder, but it doesn't seem to work. Any way to get localhost defaulting to the Sites folder? If you've installed your own apache but would still like to use the file sharing control panel to start/stop, check this out: Finally I would be interested in some recommended reading or a tutorial on how to do this by hand. This script is great, but I kinda feel like not enough masochism was involved ;-) I've Googled about, but as is always the way it seems most Unix tutorials expect you to already know the answers. thanks again PS it'd be great to have an indication of what code you accept (if any) in comments, or at least a preview button - oli, Sunday, July 31, 2005 Thanks for a very nice script. If there's ever going to be a next release you might want to use the variable for starting apache in de delete script as well. It's hard coded right now. I've made myself a slightly different version that makes the virtual host ready for a ruby on rails application. Thanks again. - Thomas, Tuesday, August 2, 2005 I do all of my development work in my computer's DocumentRoot (/Library/WebServer/Documents) and I configured the DocumentRoot as suggested. This works fine when I setup a Virtual Host, HOWEVER - when I try to reference files using localhost/sitename ie. sites not setup to use VirtualHost, Apache tries to reference the ~user/sites folder as the DocumentRoot? Thanks in advance... - Pa, Wednesday, August 3, 2005 Patrick, thanks for such an incredibly useful script! I just started doing web development on the mac and it was invaluable for setting up my testing areas. I have one suggestion, since the apachectl command can have problems, that you echo back the output of that command to the user. The first time I used the script, Apache got hung up on something and wouldn't restart properly, so I kept getting the old system-wide web documents site no matter which virtualhost I accessed. When I tried to restart Apache manually I saw the error, repaired permissions and it worked perfectly! - Nathaniel, Tuesday, January 3, 2006 I agree, brilliant script. - Jonas, Monday, February 20, 2006 thank you for the script. it's excellent. i made a slight change to allow locations outside the ~/Sites folder, as we have our test sites on another drive: echo -n " - Use $DOC_ROOT_PREFIX/$VIRTUALHOST as the virtualhost folder? [Y/n] " read resp case $resp in n*|N*) *) FOLDER=$VIRTUALHOST - mathew bittleston, Friday, June 16, 2006 I am doing web development on Mac OS10.4. I have a Windows XP system next to me that I use for browser checks. If it is possible to use this script and still use my Windows machine for browser check, can someone clearly lay out the steps. I have read all the other comments and it is still not making sense. - Marlene Ayers, Saturday, June 24, 2006 Great script. Just tested it on Intel 10.4.7 with default apache. Works great! Many Thanks - Chris Smith, Sunday, September 3, 2006 It works really nice, but i have to use sudo apachectl restart each new day to get Safari find my virtual website (which is in the default folder). Any ideas why this should be necessary? Or did i miss something during installation? Thanks! (Mac OS X 10.4.7; 8J135; PPC) - phil, Sunday, September 24, 2006 wonderful !!! thanks a lot, patrick ! - serge, Monday, September 25, 2006 Thnx for make and share this script! - Maix, Sunday, October 15, 2006 Patrick I have set my vhosts up in the inelegant way and to be honest, it works fine for me and takes me about 10mins to get up & running. The only problem I have is that I cant seem to run more than 4 vhosts. If I do, then I run a apachectl configtest, all ok there, then I restart apache and all the existing working sites on my mac dont work. Im running 10.3.9 on G5. I thought there was a limit of about 250sites or so. I only need 6. One for each type of development such as flash, CSS, PHP etc. I thought I may have a setting in httpd.conf that was limiting me, but after trawling through this over and over I cant see anything. Have checked Sams Unleashed MAC OS X book, checked httpd.org and nothing. Is it a bug or am I being really silly by not noticing the obvious? Appreciate your time in reading this.. Peace.. - Rashid, Saturday, October 28, 2006 Wicked stuff - worked where all others fail. Cheers! - RoB, Wednesday, November 29, 2006 I just tried running this on a fresh installation of Tiger and whenever I go to the sitename.dev that I create a virtual host for it just takes me to the listing of site directories in my ~/Sites folder. Can someone tell me what may be causing it to now go to ~/Sites/sitename? This is driving me nuts as I've been trying to figure it out forever! - Jeff, Thursday, December 14, 2006 It turns out it was because the IP address of my local machine on the network (192.168.1.104) was at the top of virtualhosts/_localhost instead of 127.0.0.1. - Jeff, Thursday, December 14, 2006 Thanks so much for this script. It makes web development so much easier. - Jonathan, Wednesday, January 31, 2007 Yes, that would absolutely rock if someone figured it out! Thanks again for a great tool! - Joshua, Tuesday, February 27, 2007 jonathan, for example, if my virtual host is testing.test, and its on a computer with an ip of 10.0.1.2, i'd add this line: 10.0.1.2 testing.test - mathew, Wednesday, April 11, 2007 virtualhost.sh is ace. The only problem comes when you have a squillion sites and can't remember their name. The answer is my little virtualhost auto-indexer sript: http://sourceymonkey.com/virtualhost-indexing-script - will, Friday, April 27, 2007 Love your script. It is a lifesaver. Quick question, what do you recommend backing up so that I can prevent having to recreate all the hosts in case of an emergency? - Scott Phillips, Wednesday, May 9, 2007 Hi Scott, You could create a simple backup script that would do something like: #!/bin/sh if [ ! -d ~/backups ]; then
niload -r /machines . < ~/backup/machines.txt If it was on a fresh machine, you would just have to run virtualhost.sh once so that it patches /etc/httpd.conf. Patrick - Patrick, Friday, May 18, 2007 Patrick, Why do you like the user's Sites directory more than Library/Webserver/Documents? - matt, Tuesday, July 24, 2007 Hi Matt, myself and my business partners use the script for development of sites we work on collectively, and it's much easier to access our own Sites folder rather than navigating or cd'ing to /Library/Webserver/Documents. That said, you can change the default "Sites" folder to whatever you like in the script via the DOC_ROOT_PREFIX variable. - Patrick Gibson, Wednesday, July 25, 2007 I've found that it doesn't work quite as expected if your folder names have any form of capitalization. For instance I name my folders thus: myFolder. The script performs it's thing, but when it goes to open the congrats browser window, it gives a 404 error...because the browser insists on looking for myfolder, not myFolder. Good script. Thanks! - Shelly, Tuesday, August 21, 2007 Patrick- As always, thanks for the great utility. I'm setting up Apache2 on my box and noticed a few things you might want to update. in the "delete" section, you have a line hardcoded with /usr/sbin/apachectl rather than using $APACHECTL. You also have /private$APACHE_CONFIG used in the setup, which will only work if $APACHE_CONFIG is in the /etc directory. Since /etc is a link to /private/etc, you shouldn't need the private anyways, though I suspect you wouldn't have put it there unless it broke when it wasn't! :) It might be useful to start abstracting a little bit more in preparation for the inevitable changeover to Apache2 (will OS X 10.5 have it by default?). You have httpd.conf hardcoded when Apache2 uses apache2.conf. Apache2 looks for virtualhosts by default in sites-enabled, which eliminates many of the changes you make to httpd.conf anyways. One idea you may or may not want to duplicate -- I made my script create an index.php as well as an index.html, and just added phpinfo( ) at the very bottom of your regular default output. That way it's obvious if PHP is working or not when someone's setting up a new site. - Nathaniel, Tuesday, September 25, 2007 How did I get by so long without this?! thanks! - Hubert, Wednesday, October 10, 2007 Just to let you know that this no longer works on Mac OS X 10.5 Leopard as it doesn't contain NetInfo any more. So the setup of the hostname is no longer possible :-( - Marcel, Saturday, October 27, 2007 Okay, I think I found a way around the NetInfo Problem to add the hosts. Enter the hosts into /etc/hosts as "127.0.0.1 virtualhost", just the old unix-way of doing it. Instead of restarting, type in Terminal "sudo dscacheutil -flushcache" to flush the cache and reload the file. Then "sudo dscacheutil -q host" should show you the newly entered virtualhost. After that, your browser (tested only with Safari) should access the localhost when entering "virtualhost" as the address. - Marcel, Saturday, October 27, 2007 Yeah, unfortunately Leopard breaks it all... - Scott Phillips, Sunday, October 28, 2007 I'm getting Leopard tomorrow, and as soon as I have it up and running, I'll work on an updated, Leopard-compatible version of the script. - Patrick Gibson, Sunday, October 28, 2007 I eagerly await the Leopard updates! I'm trying really really hard to be patient and not reinvent the wheel. - Samuel, Wednesday, October 31, 2007 For those still waiting for an update to this script, my friend told me about a great new app (read GUI) for setting up virtual hosts called VirtualHostX. You can download it from http://clickontyler.com/. It works great! Patrick, your script has been a wonderful friend for the last few years, but I prefer a GUI, so I will be leaving virtualhost.sh to rest in peace. Thanks for being the first to provide a solution however, for something that really should be part of a standard install. It served me well :-) - Paul Lloyd, Saturday, November 3, 2007 Too much work with too little payoff and benefits. Try MAMP Pro - Peter B., Wednesday, November 21, 2007 Patrickm thanks for your contribution. As Daniel Guntli mentioned, no IP address is required if the *:80 is used at the beginning of each VirtualHost section. I have been running 3 websites this way for over a year through a dynamic IP address. So it seems that enhancements to the script for setting up public websites would be appropriate. I will even help you test the new code if you like. Regards, - poushag, Saturday, January 5, 2008 Correction/Supplement: - poushag, Saturday, January 5, 2008 Thanks for making a Leopard version! - Phil, Saturday, January 5, 2008 Love the script! Thanks. One thing I though I should mention. If you wish to use PHP on Leopard you need to edit the httpd.conf file and uncomment the LoadModule php5_module directive. Yours, - Michael Morrison, Sunday, January 6, 2008 When non-admin user 'bob' su's to their admin account 'super-bob' in order to run this script, the SUDO_USER variable needs to be manually set to 'bob'. Otherwise, it inherits the admin's username 'super-bob', which means the Sites subdirectory is created in the wrong user's home. - Michael, Friday, January 11, 2008 After many many hours of failure, I came across your solution which saved me many, many more hours. Thank you - the script rocks. It turns out that Leopard installs the newer Apache2 which changes a lot of the rules and, as Apple does, they don't document any of this non-Apple stuff. - David, Wednesday, March 19, 2008 Hi Patrick, should be: host_exists() Found it when running the script to delete a virtual host. Best, - Daniel Jewett, Friday, April 4, 2008 Fantastic script - thank you! I've made a donation. - matt, Sunday, May 11, 2008 That was so easy it was scary. It even checked versions... downloaded the correct one automatically. I'm keeping this one- you're my hero. - Charles, Friday, July 4, 2008 I installed mamp with macports, therefore assumed that the paths to apache should lead to the macports install; and not the default one: APACHE_CONFIG="/private/etc/apache2" however; command not found. When I keep the default paths, all works fine, but ofcourse I get no working apache/php. What/how should I change to make this script cooperate with a macports install? - GG, Monday, December 29, 2008 APACHE_CONFIG="/opt/local/apache2/config" - GG, Tuesday, December 30, 2008 |
Post a comment |
