Jump to content

Apache w/virtualhosts where to install processwire?


greno
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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,

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...