Quickly setting up a website using drush worked nicely, but now I'm trying to set up a website that I've checked out using SVN. I've already set up the database, and I manually added my website to th e/etc/hosts file . (is there a terminal shortcut/command for this? ) but I'm not sure what to do next. Any tips/references?
The only main difference with the example website that I can see, is that my svn checkout website is located in /home/quickstart/websites/mywebsite/trunk/Website/http
So I've added my website name to the hosts file:
127.0.0.1 mywebsite #quickstart
And I've copied and modified the apache file of example.dev (and named it 'mywebsite' so it looks like this:
<VirtualHost *:80>
ServerName mywebsite
ServerAlias *.mywebsite
DocumentRoot /home/quickstart/websites/mywebsite/trunk/Website/http
<Directory /home/quickstart/websites/mywebsite/trunk/Website/http>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName mywebsite
ServerAlias *.mywebsite
DocumentRoot /home/quickstart/websites/mywebsite/trunk/Website/http
<Directory /home/quickstart/websites/mywebsite/trunk/Website/http>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
</IfModule>
I call the DB in settings.php using: (but for now index.php isn't even being called)
$db_url = 'mysqli://root:quickstart@localhost/mywebsite';
Comments
Comment #1
danny_joris commentedNow, I've moved the website from /home/quickstart/websites/mywebsite/trunk/Website/http to /home/quickstart/websites/mywebsite , though I'm not sure if I should do this as I don't know if this would interfere with committing back wit SVN. I also updated the apache file.
I think it connects correctly now with the DB, but now I receive a whole lot of error messages:
Comment #2
danny_joris commentedClearing cache worked. I can now see the front page. Unfortunately all other pages return a 'not found' error.
Comment #3
danny_joris commentedOkay, so when moving the website down in the folder tree, it didn't move .htaccess with it. Now it works fine.
My only doubt now is if all this moving around of files won't interfere with the CVS workflow.
Comment #4
danny_joris commentedHmm, I moved my site back to /home/quickstart/websites/mywebsite/trunk/Website/http and now it is working using
http://mywebsite/trunk/Website/http. This is because I point the apache file to /home/quickstart/websites/mywebsite instead of /home/quickstart/websites/mywebsite/trunk/Website/http.Interesting.
I might try to add a .htacces file to /home/quickstart/websites/mywebsite , so I can simplify the url. Still have to figure out how...
Comment #5
danny_joris commentedI added this snippet to the .htaccess file in
/home/quickstart/websites/mywebsite/This will make
http://mywebsite/actually open the website located at/home/quickstart/websites/mywebsite/trunk/Website/http, but when I follow a link in the website from there on, those links will refer to the long version of the url like:http://mywebsite/trunk/Website/http/contact(in case of the contact page) .Comment #6
MichaelCole commentedHi Danny,
Check out "drush help quickstart-create" for help on setting up only part of a website. I think you're looking for "dns" (/etc/hosts), and "apache"
Also, I'm not sure your intent for having the long path in the URL, but it confuses "search engine optimization" to have that extra info in there. Maybe you have a good reason for it, but it's not really best practices.
Glad you're finding quickstart useful, go open source :-)
Mike
Comment #7
danny_joris commentedHey Mike,
Thanks for your feedback.
I don't want the long path. I just 'checked out' a project in trunk using svn, and it downloaded it with the entire trunk/Website/http path, so I was afraid to change this. For developing locally I wanted to show the url shorter using .htaccess. I don't even know if I can leave the /trunk part for svn purposes.
I love all the possibilities I have now, but I'm a bit in the dark on what workflow I can or have to use.
Danny
Edit: I found out that I don't have to 'check out' the entire path of the trunk version and that I can even change the http path into 'mywebsite' for example. That's what I was looking for.