Jump to content


Photo

Apache w/virtualhosts where to install processwire?

solved

  • Please log in to reply
7 replies to this topic

#1 greno

greno

    Newbie

  • Members
  • Pip
  • 5 posts
  • 1

Posted 03 July 2012 - 06:28 PM

I have multiple sites setup using Apache VirtualHosts like this:

/var/www/html/vhost1
/var/www/html/vhost2
...

These sites are all different purposes but same owner.
They maybe could share templates and styles.

When I look at the zipfile or the tarball it has a top level directory of:
ryancramerdesign-ProcessWire-1d2b19e/...

Do I keep this top level directory or do I just extract everything under it into my existing vhostX directories?

So where should I install processwire to begin using it?

#2 greno

greno

    Newbie

  • Members
  • Pip
  • 5 posts
  • 1

Posted 03 July 2012 - 07:53 PM

Here's what I did so far.

I d/l the tarball and extract it under /var/www/html/vhost1

I make a symlink:
ln -s ryancramer-processwire-ProcessWire-1d2b19e processwire

I run the installer:
http://localhost/processwire

Install succeeds.

I access the basic example site:
http://localhost/processwire

No local links on the page work. Only external links work. For example:
http://localhost/processwire/about
Not Found
The requested URL /processwire/about/ was not found on this server.




.

#3 spoetnik

spoetnik

    Distinguished Member

  • Members
  • PipPip
  • 34 posts
  • 3

  • LocationEurope, the Netherlands

Posted 04 July 2012 - 01:25 AM

Do you see a (hidden) .htaccess file in the root of your vhost folders?

This file handles the rewrite-rules for your local links
If it ain't Dutch, it ain't much

#4 ryan

ryan

    Hero Member

  • Administrators
  • 5,771 posts
  • 3114

  • LocationAtlanta, GA

Posted 05 July 2012 - 10:23 AM

Spoetnik is correct. if URLs other than the homepage aren't working, then Apache's rewrite engine isn't working for one reason or another. If your .htaccess file isn't there, then put it there in your root directory where ProcessWire is installed. If it is there, then edit it and put some random characters at the top, like "zvljealuiveai" and save. Now reload. If you don't get a "500 Internal Server Error" then Apache is not reading your .htaccess file. The first place to check is your VirtualHost section for the account where ProcessWire is installed in your httpd.conf file. Make sure you have "AllowOverride All" (not AllowOverride None). Save and restart Apache. If that doesn't fix it, double check that you actually have mod_rewrite installed in Apache. Though I'm guessing you do, because ProcessWire would have complained about it during installation if you didn't. Let us know what you find.

#5 greno

greno

    Newbie

  • Members
  • Pip
  • 5 posts
  • 1

Posted 05 July 2012 - 12:36 PM

When I try to place:
AllowOverride All

inside this VirtualHost stanza in httpd.conf then the webserver refuses to start.

I don't see any message in the access or error log.

When I try to start Apache manually then I see this:

Syntax error on line 1016 of /etc/httpd/conf/httpd.conf:
AllowOverride not allowed here


#6 greno

greno

    Newbie

  • Members
  • Pip
  • 5 posts
  • 1

Posted 05 July 2012 - 12:50 PM

Ok, I figured it out.

The "AllowOverride All" has to go inside a Directory stanza for the path that holds this vhost.

Once I created that and added the AllowOverride All then everything works correctly.

#7 drilonb

drilonb

    Distinguished Member

  • Members
  • PipPipPip
  • 92 posts
  • 9

Posted 05 July 2012 - 01:12 PM

Can you try something like this ...


for a CentOS server, I needed to change the AllowOverride setting in the file /etc/httpd/conf.d/virtualhosts.conf


httpd.conf before:

Options FollowSymLinks
AllowOverride None

httpd.conf after:

Options FollowSymLinks
AllowOverride All

PS, if you have a same trouble with httpd you can try tuxlite script shell to make it easy for you and your virtual hosts in feature !if you have a VPS or DEDICATED server ... i use it, all my processwire sites work great,
You can't just ask customers what they want and then try to give that to them. By the time you get it built, they'll want something new.

#8 greno

greno

    Newbie

  • Members
  • Pip
  • 5 posts
  • 1

Posted 05 July 2012 - 01:45 PM

drilonb, thanks.

Yes I'm sure that would work too but it would of course end up applying to all of my vhosts instead of just this one vhost.

That's why I created a Directory stanza just for this particular vhost so I could limit the scope since this is the only vhost where processwire is being used currently.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users