Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-11-2008, 03:23 AM   #1
Registered: Aug 2003
Location: MO, USA
Distribution: Mandrake 9.1/9.2(Laptop)
Posts: 117

Rep: Reputation: 15
Redirecting Apache2 to Wordpress site by default

Running Ubuntu 8.04 (Desktop) with Apache2 installed from repositories. It was all set up using this HOWTO, except I replaced the name of the blog directory, making it mydomain rather than wordpress. As a consequence, I have to go to in order to view the blog. What I want is to just be able to type in and view the blog, without the subdirectory. I've set up a NameVirtualHost with the following configuration:
NameVirtualHost *
<VirtualHost *>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/mydomain/
	<Directory />
		DirectoryIndex index.html index.php
		Options FollowSymLinks
		AllowOverride None
	<Directory /var/www/mydomain/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
	ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128

but all that accomplishes is to give me an index page containing a link to the directory 'mydomain'.

I've tried simply placing the wordpress files and directory structure in www, but that jut makes all the php paths fail and everything on the page is broken. Surely I'm missing something simple here. I've tried creating a link named index.php targeted to the actual wordpress index file, which sort of works; I can type into the address box, though apache still redirects to which looks kind of silly. There must be some way to accomplish this.
Old 09-11-2008, 03:45 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,903

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
inside the <VirtualHost *> definition.


apache, directory, wordpress

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 - how to get rid of apache2-default ozymandias Linux - Server 4 09-12-2008 11:27 AM
Redirecting from old site to new site Sheridan Linux - Networking 1 02-02-2008 01:52 PM
apache2 vhost site makes default site inaccessible jyamada1 Linux - Server 4 01-17-2007 09:42 PM
LXer: Automating Web site and WordPress upgrades with Subversion, mirrorlinks and bash LXer Syndicated Linux News 0 11-11-2006 11:33 AM
apache2 Home practice site comprookie2000 Linux - Networking 3 01-19-2005 05:44 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration