0
votes
1answer
35 views

Apache mod_proxy

Uggh, I'm spewing that I can't figure this out, I'm so frustrated: <VirtualHost *:80> servername domain1.com.au ServerAdmin webmaster@localhost DocumentRoot ...
0
votes
1answer
34 views

Configuring subdirectory with apache2 and HTTPS

I have a domain my.domain.com that points to a Zend Framework 2 application at /path/to/project/public which has a .htaccess and index.php file which handles all requests. At ...
3
votes
2answers
178 views

Mass virtual hosting with Apache 2.4

I would like to use the value set by VirtualDocumentRoot in a RewriteRule. The Apache documentation says: The other thing to determine is the document root (configured with DocumentRoot and ...
0
votes
1answer
55 views

VirtualHost Redirect should work with new RewriteBase

Inside the VirtualHost I got this redirect: RewriteBase / RewriteCond %{REQUEST_URI} wp-content/uploads/([^.]+\.(jpe?g|gif|bmp|png))$ RewriteRule (.*) http://example.org/$1 [R=301,L,NC] So the full ...
0
votes
1answer
34 views

RewriteRule Not Rewriting URL properly [duplicate]

I have the following virtual host file: <IfModule !wsgi_module> LoadModule wsgi_module modules/mod_wsgi.so WSGISocketPrefix run/wsgi </IfModule> <VirtualHost *:80> ...
0
votes
0answers
144 views

CakePHP Rewrite Loop using Subdomain Wildcards

I am using CakePHP 2.4 and usually setup a single virtualhost file to point to dev.myapp.com and everything works fine. dev.myapp.com goes to the home page, and dev.myapp.com/users goes to the main ...
-1
votes
1answer
150 views

mod_rewrite: Redirect https://example.com to https://sub.example.com [duplicate]

I have an domain example.com running on an Apache Server and I want to redirect every call to https://example.com to https://sub.example.com. I have a Virtual Host configured like this: ...
1
vote
2answers
104 views

Server-level block, deny, or redirect based on User-Agent?

We've recently begun having trouble with web-scraper/DDoS service 80legs taking down our servers a couple times per week due to their abusive crawling practices. Initially we were simply dropping in ...
0
votes
2answers
70 views

getting started with apache mod_rewrite on a virtual host [duplicate]

hey SO I am attempting to use apache's mod_rewrite module to do some basic rewrting of url on my website so they become a little more seo friendly basically I have a virtual host file that look ...
1
vote
2answers
203 views

Virtual Host Configuration and mod_rewrite - Removing PHP Extension and Adding Forward Slash

On my production server, things are fine: PHP extension removal and trailing slash rules are in place in my .htaccess file. But locally, this isn't working (well, partially, anyway). I'm running ...
0
votes
2answers
563 views

ProxyPass for specific vhost with mod_rewrite

I have a web server that it set up to dynamically server different document roots for different domains <VirtualHost *:80> <IfModule mod_rewrite.c> # Stage sites :: ...
2
votes
2answers
221 views

Use subpath internal proxy for subdomains, but redirect external clients if they ask for that subpath?

I have a VirtualHost that I'd like to have several subdomains on. (For the sake of clarity, let's say my domain is example.com and I'm just trying to get started by making foo.example.com work, and ...
0
votes
1answer
94 views

Trouble configuring virtual host to allow standard wordpress mod_rewrite for permalinks

I'm having a little trouble getting the standard mod_rewrite that wordpress generates in my directorys .htaccess file to work correctly. The server I'm using has a virtual host set up on it by ...
3
votes
2answers
355 views

Apache configuration - rewrite rule for all virtual hosts

I have the following configuration with 2 virtual hosts on my Apache: www.domain.com and res.domain.com. The first one is open the second is limited to registred users. <VirtualHost *:80> ...
1
vote
0answers
91 views

Mass virtual hosting and subdomain

I'm trying to setup zero-config web-development environment: wildcard DNS plus dynamic virtual hosts. Here is my v-hosts config: NameVirtualHost *:80 <VirtualHost *:80> ServerAlias *.dev ...
1
vote
1answer
1k views

SSL setup with apache in front of tomcat

i m trying to setup Apache with SSl and proxy SSL requests to my tomcat instance. I think i made the SSL work but theres still a error that shows up: Bad Gateway The proxy server received an ...
0
votes
1answer
364 views

Infinite loop with VirtualDocumentRoot, .htaccess and mod_rewrite

I want to set up robust multiuser development environment with apache2. So I placeed the following file to etc/apache2/sites-available/mydomain.com <virtualhost *:80> ServerName ...
0
votes
0answers
202 views

mod_rewrite in .htaccess w/ wildcard virtual hosts - preserving subdomain while funneling requests through index.php

I have a project which utilizes wildcard subdomains to allow requests for www.foo.com, api.foo.com, & admin.foo.com to utilize the same document root. Routing for this project is based initially ...
1
vote
1answer
43 views

Internally prefix all paths with culture?

Internationalized user visible URLs (all on one server): http://example.us/example/path http://example.de/beispiel/pfad The URL paths should translate internally to (for further processing with ...
0
votes
1answer
107 views

Apache2 with mod_proxy_ajp doesn't rewrite url

I have apache2 exposing a jboss through mod_proxy_ajp on / and serving some static content with ProxyPass /static ! ProxyPass / ajp://localhost:8009/ in proxy_ajp.conf. I need to redirect all the ...
0
votes
2answers
219 views

Adding apache rewrite rules to a large number of vhosts

To fix a security problem I need to add some rewrite rules to all our virtual host configurations. Are there any options adding rewrite rules to all virtual host declarations besides updating to ...
1
vote
1answer
60 views

How can I create multiple VirtualHost entries that share a set or RewriteRules?

I have an apache configuration with three virtualhost entries. Each entry is bound to a different port so that we can provide a different SSL certificate based on the port. Our load balancer is ...
0
votes
1answer
328 views

apache virtualhost: Auto subdomain with exception

I've been searching for a way to automatically redirect domains to a specific folder, and fond a good answer here on serverfault: Apache2 VirtualHost auto subdomain. (The accepted answer) So far ...
1
vote
1answer
175 views

Hiding a Website from Search Engine Bots and Viewers by Disabling Default VirtualHost

When staging a website on a remote VPS, we would like it to be accessible to team members only, and we would also like to keep the search engine bots off until the site is finalized. Access control ...
2
votes
1answer
94 views

Apache Rewrite -> I am not sure why these rules dont work

I am running Apache, CentOS 6. I have a set of URL's that if they are hit, I want the user directed to the index.php I cannot figure out why these rules dont work. Can anyone explain? UPDATE: New ...
0
votes
2answers
753 views

Virtual hosts on apache to point domain.com, domain.net, domain.org to all go to domain.com

All of the names currently point to the same web server folder which is correct. That is, the domain.net, domain.org, etc all work without redirecting to the main .com How do I get visits to the .org ...
0
votes
2answers
12k views

Apache Virtual Host with Alias

I have a virtual host running on my local copy of Apache. It has an alias. <VirtualHost 127.0.0.1> ServerName oliverash.me.dev DocumentRoot "/usr/docs/oliverash.me/public" ...
0
votes
2answers
90 views

Unable to get mod_rewrite to stop processing

This is linked to Rewriting subdomain.domain.com when other 'subdomains' exist I need mod_rewrite to 'stop' processing, but it seems to continue on. On my registrar, I've set A records as: ...
0
votes
1answer
173 views

Rewriting subdomain.domain.com when other 'subdomains' exist

My httpd.conf looks like this: NameVirtualHost 12.34.56.78:80 <VirtualHost 12.34.56.78:80> DocumentRoot /var/www/html/site ServerName www.example.com <IfModule mod_rewrite.c> ...
2
votes
2answers
467 views

Wildcard SSL certificate subdomain mismatch with www - Apache 2.2

Below is a snippet from my httpd.conf file. The problem I'm having is that when I access "https://www.subdomain2.domain.co.uk" I get a "certificate error" indicator in the URL bar in IE7: "The ...
1
vote
1answer
235 views

Website integration: Frame, redirect or virtual domain?

I'm overwhelmed by the many choices one has in website design. I'm probalbly asking something really easy to set up, but since I don't have any experience, I'm looking for help. Current Setup I've ...
0
votes
2answers
233 views

Apache2 - Multiple VirtualHosts for Same Domain

I have an Apache server that I am running on localhost. The root http://localhost should go to a VirtualHost application (Joomla!), while I want http://localhost/test to go to a second VirtualHost - a ...
3
votes
2answers
441 views

Apache nested virtual hosts

I have two virtual hosts in a apache server and I would like to do something but I don't know if is possible. The thing is that I have the main application developed and ruby and the blog is in ...
0
votes
1answer
401 views

mod_rewrite rules in a separate configuration file (Aegir)

I got a virtual host configuration file I cannot edit or modify directly, since it's generated by our hosting platform, Aegir. But it does have Include pre.d and Include post.d statements that are ...
1
vote
2answers
261 views

mod_rewrite should serve files that exist in document root but is ignoring them

I've lifted most of this from Wordpress, so any path on the domain like say /search or /list is directed to /index.php. Fine that works. However, it should not do that if the file being requested ...
2
votes
1answer
401 views

How do I deploy two zend frame work based apps in apache2 like the one in tomcat

I have two Zend framework applications called finance and fleet. Both of them have the same .htaccess file as indicated below RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -s [OR] ...
0
votes
1answer
73 views

Apache: Configuration for main site and subdomains

I want to setup an specific environment for my hostings, but don't know what's the best approach. I want have a domain called example.com. * The www. should contain the main website (hosting site) * ...
29
votes
4answers
68k views

Redirect URL within Apache VirtualHost?

I have a dedicated server with Apache, on which I've set up some VirtualHosts. I've set up one to handle the www domain as well as the non-www domain. My VH .conf file for the www: <VirtualHost ...
4
votes
1answer
458 views

Dynamic subdomains, mod_python and trac

I'm going to be running multiple subdomains, eventually too many to be able to each have their own config files. I have the vhosts working how I want them so each subdomain has their own folder eg ...
2
votes
1answer
1k views

mod_rewrite adding documentroot to url

The following rewrite redirects http://example.com/ to http://example.com/www/www.example.com/public%5Fhtml instead of http://www.example.com/. /www/www.example.com/public_html is the DocumentRoot. # ...
0
votes
3answers
1k views

apache2 force proxy for specific url on a subdomain

I have a site that has dynamic virtual subdomains using mod_rewrite, as defined like this: <VirtualHost *:80> ServerName example.com ServerAlias *.example.com DocumentRoot ...
1
vote
2answers
2k views

Apache mod_rewrite, using current URL in RewriteCond

I have several RewriteRules in an Apache VirtualHost configuration. I'd like to be able to test the current URL (after the preceeding rewrites) against some condition. The problem is that the ...