I agree this is a fundamental question. As soon as I had my site up and running I wanted to fix the base URL before too many absolute links ended up in my site.
I'm a newbie, but this is how I did it. Experts please comment!
My goal was to go from:
- Code: Select all
http://www.mysite.com/drupal-6.10 [URL for my drupal website]
http://www.mysite.com/xampp [URL for my xampp admin]
to
http://www.mysite.com [URL for my drupal website]
http://www.mysite.com/xampp [URL for my xampp admin]
What I did:
In /opt/lampp/etc/httpd.conf
- Code: Select all
# Was DocumentRoot "/opt/lampp/htdocs"
DocumentRoot "/opt/lampp/htdocs/drupal-6.10"
Also added in httpd.conf immediately after <Directory "/opt/lampp/htdocs"> section:
- Code: Select all
# Copy of settings from <Directory "/opt/lampp/htdocs"> section:
<Directory "/opt/lampp/htdocs/drupal-6.10">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Also in httpd.conf in the <IfModule alias_module> section:
- Code: Select all
# I still want access to xampp and webalizer.
Alias /xampp /opt/lampp/htdocs/xampp
Alias /webalizer /opt/lampp/htdocs/webalizer
Now there is a redirect to xampp in /opt/lampp/htdocs/index.html that can confuse everything (by starting an infinite loop with the Alias above, methinks):
- Code: Select all
mv /opt/lampp/htdocs/index.html to /opt/lampp/htdocs/index-original.html
# and restart the servers
/opt/lampp/lampp restart
Finally I get my browser to forget the past by clearing its cache (this is important):
In Firefox: Tools >> Clear Private Data.
That's it. If the above is correct, I believe it belongs in the lampp documentation.
Are there any mistakes in the above; is it 'best practice'? Will the webalizer still record its data correctly?
thanks,
Neil