I'm trying to figure out how to add a site without using the quickstart-create utility, so I'll understand how to do it outside of quickstart.
From what I understand, you would usually create a definition file in /etc/apache2/sites-available - then run a2ensite with the name of the definition file as an argument and reload apache. a2ensite adds a link in /etc/apache/sites-enabled.
But on quickstart I see there is a /home/quickstart/websites/config/apache-sites-enabled folder that looks like it's doing the job of the /etc/apache/sites-enabled, but I don't see where to add the definition file for a new virtual host.
So how do I add a virtual host myself, without drush quickstart-create?
Comments
Comment #1
rfayWhat you described is the normal debian/ubuntu workflow. That should work for you, unless quickstart has massively modified things (I hope not).
It's easy to have more than one directory that has included sites. I imagine that's what's going on here.
Comment #2
MichaelCole commentedHi,
rfay is correct. Below is a blow-by-blow of the process (didn't test).
If you notice any possible improvements, comment back.
Comment #3
Benj commentedThanks
I'm confused though, because there is a virtual host definition file for example.dev in etc/apache2/sites-enabled, and not in etc/apache2/sites-available.
The script above puts the definition file in the sites-available folder, and runs a2ensite, which puts a link in the sites-enabled folder. But example.dev has no file in the sites-available folder, but does have the example.dev definition file in the sites-enabled folder.
I feel like I'm missing something...
Comment #4
MichaelCole commentedHi Horse,
In previous versions (pre 0.8), the virtual host files went right into sites-enabled. Someone pointed out this is contrary to the apache way, so it changed in 0.8. The apache way is to:
1) Put the file in sites-available
2) Then use 'a2ensite' to make a symbolic link from sites-available to sites-enabled
Putting the file directly in sites-enabled has the same effect, but is harder for apache admins to grok immediately. Don't forget to restart apache for the changes to take effect.
/home/quickstart/websites/config/apache-sites-enabled is a link to the /etc/apache2/sites-enabled folder. If you 'ls -l ~/websites/config' you'll see these are all links to other files and folders. There should probably be a readme.txt in there.
I made the drush command because even though I understand the configuration steps and options, it's still a PITA to do every time.
Is there something about the drush command that isn't working/confusing, or are you just trying to understand what's happening behind the scenes?
Cheers,
Mike
Comment #5
Benj commentedI see, indeed, I'm running Quickstar 0.6
I'm just trying to understand. I'm using quickstart to ease into Linux in my own neurotic way (It's been helpful - thanks) in addition to Mark G. Sobell books - starting ground-up, and so on. Now having been exposed, it really seems silly not to run Linux as the OS and put chubby windows on the virtual box for testing purposes and running the odd program.
I just set up a folder by hand in the apache way, and plan to load a Drupal 6.17 site there for updating and developing. I'll probably use your quickstart-make utility for the next fresh install now that I've got an idea what's going on. ;)
Comment #6
MichaelCole commentedOk, groovy HorseEatingWeeds,
I'd recommend upgrading to the 0.8 version when you get a chance. I fixed some bugs in 0.6 and 0.7 that I found while making the demo videos on the Youtube.
If you find anything you especially like as a Linux tutorial/primer, let me know. There's a section in the FAQ for that which could be improved.
Have at it!
Mike