Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Wordpress redirect breaks virtualhost |
|
Author |
|
jasontheadams
Joined: 09 Feb 2014 Posts: 9 Location: United States, Detroit
|
Posted: Sun 09 Feb '14 17:50 Post subject: Wordpress redirect breaks virtualhost |
|
|
Running Apache 2.2.22 on Ubuntu 12.04
Here's (in addition to default) my papertower config in sites-available: http://pastebin.com/rb8BPKh6
When I restart, I get this message: http://pastebin.com/mrTp9ie7
I'm coming from Apache on Windows and trying to set up the same workflow I had there. Basically, if I placed a folder in /www/papertower/ it would become accessible via directoryname.papertower.dev after adding the host. Worked great!
I'm having a strange issue getting it going again. Oddly, when I didn't have the wordpress config set up properly and went to site.papertower.dev, it would give me the "failed to connect to database" message. This made me happy, as it meant it was pointing at the right folder. Once I fixed the database config file, however, and go to site.papertower.dev, it thinks for a moment, then goes to www.site.papertower.dev and gives me a "Oops! Google Chrome could not find www.site.papertower.dev".
I double-checked that all the appropriate mods were enabled (especially rewrite), but that hasn't made a difference.
Any help is greatly appreciated! Thanks! |
|
Back to top |
|
jasontheadams
Joined: 09 Feb 2014 Posts: 9 Location: United States, Detroit
|
Posted: Mon 10 Feb '14 3:37 Post subject: |
|
|
I have been fighting with this for many hours. Absolutely any help with this would be greatly appreciated! I'm at my wits end! |
|
Back to top |
|
Anaksunaman
Joined: 19 Dec 2013 Posts: 54
|
Posted: Mon 10 Feb '14 12:34 Post subject: Wordpress redirect breaks virtualhost |
|
|
Not an Ubuntu expert, unfortunately, so all ideas are from the peanut gallery but...
Are you certain that all the hosts are available independent of Wordpress? At a guess, it may very well be that though you have the wildcard setup, your Apache install is getting confused when provided with a specific subdomain.
Some things to consider...
* Eliminate any duplicate NameVirtualHost entries between ports.conf and any other .conf files (most likely apache2.conf)
* Adding an entry to /etc/hosts for the domains to be served e.g. Code: | 127.0.0.1 localhost site1 site2
|
or perhaps if you require seperate IP addresses
Code: | wordpress site 1: 127.0.0.1
wordpress site 2: 127.0.0.2 |
* Make sure that the appropriate virtual hosts entries are in your sites-enabled directory and ports.conf files. You may have to update your apache2.conf file as well.
Also, as I understand it, you should be using something like:
Code: | sudo a2ensite mynewsite
sudo service apache2 restart |
|
|
Back to top |
|
jasontheadams
Joined: 09 Feb 2014 Posts: 9 Location: United States, Detroit
|
Posted: Mon 10 Feb '14 18:05 Post subject: Re: Wordpress redirect breaks virtualhost |
|
|
Hi Anaksunaman! Thanks for replying!
Anaksunaman wrote: | Are you certain that all the hosts are available independent of Wordpress? At a guess, it may very well be that though you have the wildcard setup, your Apache install is getting confused when provided with a specific subdomain. |
Can you please explain what you mean here? I've tried nixing the subdomain method I'm using here and using a simple, dhae.dev domain.
And, yes, I've registered everything with /etc/hosts that I'm using. Also, like I said, the domain (and sub-domain) works so long as Wordpress doesn't.. work. So if I remove the password from wp-config.php, I get a "failed to connect to database" page. Which is great! That means it's going through the Wordpress process. But if I re-apply the password, it stops working. My guess is Wordpress is redirecting and apache doesn't work with anything beyond the root site directory.
As an experiment, I tried making a fresh wordpress installation at localhost/wordpress. After setup everything was... wrong. The site looked all wrong and when I tried to log into the account I got the "domain not found" error again. Something is clearly all buggered up with Wordpress as a whole.
I'm thinking of becoming a lumberjack instead. |
|
Back to top |
|
jasontheadams
Joined: 09 Feb 2014 Posts: 9 Location: United States, Detroit
|
Posted: Mon 10 Feb '14 19:24 Post subject: |
|
|
Not to add more threads, but for the sake of being more on point, I moved this to a new thread. I believe I'm very close to the issue, and I think the answer to that will solve my problem.
New thread: http://www.apachelounge.com/viewtopic.php?p=26826#26826
Thanks! |
|
Back to top |
|
|
|
|
|
|