Vvv: Apache mod_rewrite issues

Created on 24 Apr 2013  Â·  9Comments  Â·  Source: Varying-Vagrant-Vagrants/VVV

First off, I've found this to be an incredible resource! Thanks to everyone involved for your hard work in putting this together.

Secondly, I'm way over my head when it comes to server administration, so forgive me if this doesn't make complete sense. Best I can tell, mod_rewrite is not enabled with this setup which is resulting in some of my wordpress sites having issues with their URLs and properly loading page resources.

It's also preventing me from using the .htaccess tip found here to look for assets that aren't found on local by checking the coresponding path on production (last code snippet in the article): http://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git

If someone more gifted in this area than myself could get mod_rewrite working I'd be very thankful.

Most helpful comment

+1 on the possibility of running Apache on VVV

All 9 comments

Vagrant installs Nginx, not Apache. Can you describe the issues you're having in greater detail?

On Apr 24, 2013, at 10:22, Andrew Boyd [email protected] wrote:

First off, I've found this to be an incredible resource! Thanks to everyone involved for your hard work in putting this together.

Secondly, I'm way over my head when it comes to server administration, so forgive me if this doesn't make complete sense. Best I can tell, mod_rewrite is not enabled with this setup which is resulting in some of my wordpress sites having issues with their URLs and properly loading page resources.

It's also preventing me from using the .htaccess tip found here to look for assets that aren't found on local by checking the coresponding path on production (last code snippet in the article): http://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git

If someone more gifted in this area than myself could get mod_rewrite working I'd be very thankful.

—
Reply to this email directly or view it on GitHub.

Ah, well that would make a lot more sense. Didn't realize Nginx was a replacement for Apache. Like I said, over my head.

Examples would be some the following two .htaccess blocks not working (which now makes perfect sense now that I know Apache is not installed).

# BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /site/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /site/index.php [L]
</IfModule>
# END WordPress

and:

# Attempt to load files from production if they're not in our local version
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule (.*) http://sigorasolar.com/assets/images/$1
</IfModule>

The server I am going to be deploying to is running Apache rather than Nginx. Does this mean that this Vagrant is not for me? Do you know of a resource for switching between the two?

Vagrant is a good resource for you for developing sites on Apache servers,
however, this particular project has focused on server environments using
Nginx rather than Apache. I would bet there's a good basic Vagrant box out
there configured to use Apache - does anyone have one that they've used?

On Wed, Apr 24, 2013 at 10:36 AM, Andrew Boyd [email protected]:

Ah, well that would make a lot more sense. Didn't realize Nginx was a
replacement for Apache. Like I said, over my head.

Examples would be some the following two .htaccess blocks not working
(which now makes perfect sense now that I know Apache is not installed).

BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /site/index.php [L]

END WordPress

and:

Attempt to load files from production if they're not in our local version


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://sigorasolar.com/assets/images/$1

The server I am going to be deploying to is running Apache rather than
Nginx. Does this mean that this Vagrant is not for me? Do you know of a
resource you for switching between the two?

—
Reply to this email directly or view it on GitHubhttps://github.com/10up/varying-vagrant-vagrants/issues/59#issuecomment-16951153
.

Closing this issue as the original question was about the use of Apache.

@boydbme The scaffold we have setup here should work pretty well with Apache in the future. However, you'd need to fork it and then modify some of the provisioning to work with Apache instead. I think this is a goal of ours in the future, but it may be a bit while we lock down the moving bits here.

+1 on the possibility of running Apache on VVV

+1 to to make this use Apache which is more common on every webserver

+1 in support for Apache.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings