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

danny_joris’s picture

Now, 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:



    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'zen_menu_local_tasks' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: Invalid argument supplied for foreach() in /home/quickstart/websites/mywebsite/includes/theme.inc on line 485.
    * warning: Invalid argument supplied for foreach() in /home/quickstart/websites/mywebsite/includes/theme.inc on line 490.
    * warning: Invalid argument supplied for foreach() in /home/quickstart/websites/mywebsite/includes/theme.inc on line 485.
    * warning: Invalid argument supplied for foreach() in /home/quickstart/websites/mywebsite/includes/theme.inc on line 490.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'zen_links' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/quickstart/websites/mywebsite/includes/theme.inc on line 976.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'zen_links' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mywebsite_ds_field' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.
    * warning: array_map() [function.array-map]: Argument #2 should be an array in /home/quickstart/websites/mywebsite/modules/system/system.module on line 1015.
    * warning: array_keys() expects parameter 1 to be array, null given in /home/quickstart/websites/mywebsite/includes/theme.inc on line 1817.
    * warning: Invalid argument supplied for foreach() in /home/quickstart/websites/mywebsite/includes/theme.inc on line 1817.
    * warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'zen_breadcrumb' not found or invalid function name in /home/quickstart/websites/mywebsite/includes/theme.inc on line 656.


danny_joris’s picture

Clearing cache worked. I can now see the front page. Unfortunately all other pages return a 'not found' error.

danny_joris’s picture

Okay, 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.

danny_joris’s picture

Hmm, 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...

danny_joris’s picture

I added this snippet to the .htaccess file in /home/quickstart/websites/mywebsite/

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.)*$	trunk/Website/http/$1 [QSA,L]

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) .

MichaelCole’s picture

Status: Active » Closed (works as designed)

Hi 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

danny_joris’s picture

Hey 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.