Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
170 views

Apache: Dynamically set Documentroot inside Virtualhost Section based on reverse-DNS Notation [closed]

we want to setup one apache-server via VHosts to do the following: We want to route each of our mutliple domains to their corresponding location based on the domain-name (including subdomains, so the ...
Leander Hass's user avatar
1 vote
1 answer
206 views

VirtualDocumentRoot in VirtualHost with SSL results in 404 responses

I'm trying to configure a very basic server setup where domains are served from their own directory. For example: https://oblik.dev/foo.html > /var/www/oblik.dev/foo.html https://test.oblik.dev/foo....
dodov's user avatar
  • 5,724
0 votes
1 answer
122 views

Using wordpress for /blog route in nodejs website not working

I created a vhost like this in my apache2 server configuration: <IfModule mod_ssl.c> <VirtualHost *:443> ServerName test.co ServerAdmin webmaster@localhost #wordpress ...
Hunter's user avatar
  • 469
0 votes
0 answers
118 views

Vhost access error / wamp

I have a big problem with my vhost installation with my wamp server when i want to load my website, it display this : "Forbidden You don't have permission to access / on this server." i have ...
Issac411's user avatar
0 votes
1 answer
361 views

apache config VirtualDocumentRoot

I have this configuration in my httpd-vhosts.conf: <Directory "/Users/uername/Library/Mobile Documents/com~apple~CloudDocs/Sites"> Options Indexes MultiViews FollowSymLinks ...
user avatar
2 votes
2 answers
801 views

non-www. domain not redirecting to www. domain

In a nutshell WORKS FINE: www.exampledomain.co.uk{/with-any-url} GIVES 404 ERROR: exampledomain.co.uk{/with-any-url} In detail I am having an issue with a site running on linux/apache2 whereby 'www....
ajmedway's user avatar
  • 1,492
1 vote
1 answer
372 views

PHP-FPM + mod_vhost_alias

How it's possible to make both work together vhost_alias works fine without proxypassmatch and fpm works fine in a exclusive vhost, its possible to use % from vhost_alias? <IfModule ...
rzx10r's user avatar
  • 134
1 vote
2 answers
954 views

Is there an NGINX equivalent of Apache's Directory Interpolation

With Apache's mod_vhost_alias you can use Directory Interpolation to serve sites based on directory structure. See here http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html#interpol Is this ...
Keegan 82's user avatar
  • 404
2 votes
1 answer
868 views

mod_vhost_alias and VirtualDocumentRoot: How to add penultimate and last part?

How to obtain a directory name consisting of two last parts of the domain name. Or use a dot? For example, I have a domain any.ms and I would like the dynamic domains foo.any.ms and domain bar.any.ms ...
Gander's user avatar
  • 1,982
0 votes
1 answer
4k views

Apache ServerName * wildcard not working with vhost_dbd_module

I'm trying to migrate my virtualhosts to a mysql database using vhost_dbd_module. In the various examples I find online, they instruct me to use "ServerName *" as a wildcard in the VirtualHost. ...
WhiteEyebrows's user avatar
0 votes
1 answer
288 views

apache2 : userdir in userdir.domain.fr using VirtualDocumentRoot

I use apache2 and I want to have something like username.mydomain.fr www.mydomain.fr --> /var/www/web-en-royans that is works fine username.mydomain.fr --> /home/username/www that does not work also,...
psic's user avatar
  • 359
1 vote
0 answers
252 views

apache alias and relative urls

I have made a new website for a customer. Before we put it online he wants to see it. Now, I have server, so I thought of putting it in a subdirectory: http://localhost/project2 I added this to the ...
Wim's user avatar
  • 41
0 votes
1 answer
410 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 ...
Matworms's user avatar
1 vote
1 answer
336 views

Using fall-through rewrite for mod_vhost_alias

I run a couple dozen sites on my test VPS, and currently use mod_vhost_alias to avoid needing a new VirtualHost every time I throw up a new site. My current configuration looks like this: <...
CristosLC's user avatar
  • 412
3 votes
2 answers
7k views

Apache Virtual Host using mod_vhost_alias

I am trying to set up my apache module to dynamically direct all requests to a specific folder and then match the name to a folder of the same name. To do this I set the following in my 000-default....
Go0se's user avatar
  • 98
0 votes
1 answer
456 views

Apache dynamic subfolders

I need to setup Apache so it deals with 2 different disk locations and maps different sites dinamically based on the subfolder on the URLs: http://localhost1/site1.com/ http://localhost1/site2.com/ ...
Onesiphorus's user avatar
0 votes
1 answer
575 views

Apache vhost_alias

I have a question about vhost_alias I got it working, it does the following job: vhost.subdomain.domain.com -> sends to /var/www/vhost using virtualdocumentroot and %1 But I don't like that I can ...
user2042985's user avatar
2 votes
2 answers
1k views

Mass virtual hosting and rewrite rules causing recursive internal redirect

I'm using vhost_alias for to do mass virtual hosting and have several sites using mod_rewrite to manage their front controllers. I don't think this is a specific Symfony issue, but I'm using Symfony. ...
Jens's user avatar
  • 5,857
1 vote
1 answer
93 views

Allow sub domains, but don't match www

I'm currently trying to configure Apache vhost configuration and was hoping to be able to use mod_vhost_alias for everything. Instead of setting up a configuration for each website I wanted to make ...
Steven10172's user avatar
  • 2,013
0 votes
2 answers
913 views

Apache Multiple VirtualDocumentRoot for Single Wildcard domain *.dev

I'm working with Virtualhosts and a local catch-all domain TLD and I need 3 use-cases to work simultaneously, but so far, I've only been able to get two to work at a time. I need for three different ...
Aaron Butacov's user avatar
0 votes
1 answer
112 views

Erro Setting up VirtualHost for folders belonging to same domain

Noob Here.. I have the following folder structure on my Ubuntu Machine /var/www/ /folder1 /folder2 Now i want to redirect my url xyz.com to folder1 & xyz.com/blog to folder2. I ...
Jigar Jain's user avatar
  • 1,447
0 votes
2 answers
681 views

How to get default host work with mod_vhost_alias without mod_rewrite?

I recently added a virtual host config to my apache which is using mod_vhost_alias to route requests to domain-like directories. If the directory exists everything works just fine. Now my thought was, ...
dops's user avatar
  • 1
1 vote
1 answer
2k views

wamp local subdomains and htaccess rewrite rules

i recently fixed my site up with a bit up php mvc magic for which i use those settings in my .htaccess: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{...
stephanlindauer's user avatar
3 votes
2 answers
2k views

How to Override DocumentRoot on Per Request Basis using VirtualDocumentRoot

So people complained about how PHP Scripts using DOCUMENT_ROOT break when Apache is being run with VirtualDocumentRoot and mod_vhost_alias since DOCUMENT_ROOT doesn't get set properly. Apache ...
JamesHoux's user avatar
  • 3,347
0 votes
1 answer
267 views

Apache2 mixing mod_vhosts_alias and mod_rewrite

The Apache2 docs recommend mod_rewrite as a last resort for specifying which directory to send a given host request to. They said use mod_vhosts_alias. I set that up and its working without problem. ...
JamesHoux's user avatar
  • 3,347
2 votes
0 answers
404 views

mod_vhost_alias + wildcard + custom php.ini

Here's my httpd.conf thats using mod_vhost_alias. The docroot is always in /home/username/domains/domainname/public_html. <VirtualHost *:80> ServerName *.abc.com ServerAlias *.abc....
user1779542's user avatar
1 vote
3 answers
755 views

Apache 2, ubuntu - VHost doesn't work

I want to create VHost on my machine. My config: /etc/hosts 127.0.0.1 mysite.dev /etc/apache2/sites-available/mysite.dev <VirtualHost *:80> SetEnv APPLICATION_ENV "development" ...
michail_w's user avatar
  • 4,451
0 votes
1 answer
1k views

Subdomain to subfolder in Apache

I am looking for Apache configuration that would allow for the following: Serve sub.domain.com as /%docRoot%/domain.com/sub, and Would be able to do this for every hosted domain and any subdomain (ie....
David's user avatar
  • 1,065
3 votes
2 answers
7k views

Can I run PHP and Python on the same Apache server using mod_vhost_alias and mod_wsgi?

I currently run my own server "in the cloud" with PHP using mod_fastcgi and mod_vhost_alias. My mod_vhost_alias config uses a VirtualDocumentRoot of /var/www/%0/htdocs so that I can serve any domain ...
ringmaster's user avatar
  • 3,299
1 vote
1 answer
2k views

File not found with VirtualHost and mod_rewrite

I'm bulding a RESTful api based on Tonic. On my developer machine and our stage server we use virtual hosts. Tonic uses a .htaccess file to translate the incomming calls to it's dispatcher.php file. ...
ztripez's user avatar
  • 674
3 votes
2 answers
1k views

Dynamic open_basedir with mod_vhost_alias

I'm using mod_vhost_alias and want to set dynamically open_basedir for each user. Something like php_admin_value open_basedir /var/www/vhosts/%1 But it doesn't work. Because I have a lot of virtual ...
ALex_hha's user avatar
  • 1,363
0 votes
1 answer
358 views

How do I set up virtual host directories for sub-subdomains same as subdomains?

I currently use mod_vhost_alias with a wildcard ServerAlias to catch all subdomains for the domain I use to hold development versions of websites. This works great, but I reach an issue when I need ...
Rhys's user avatar
  • 1,581
1 vote
2 answers
573 views

A different document root for beta users?

I have a wordpress based php application running on apache on ubuntu server. I have developed a new version of the application, and I'd like only certain users to access this beta. My server's ...
Munim's user avatar
  • 6,460
1 vote
1 answer
899 views

Using mod_vhost_alias with CakePHP (which uses mod_rewrite)

I am not an apache guru. But I want to configure my server for mass virtual hosting using CakePHP. The idea is that we will be able to easily set up multiple versions of the same application based on ...
Chuck Burgess's user avatar
3 votes
1 answer
2k views

Configure apache mod-vhost-alias

I was wondering if you could use a wildcard in the VirtualDocumentRoot directive. I mean is it possible to scan multiple directories with the VirtualDocumentRoot, like multiple home directories to ...
Kyle Hotchkiss's user avatar