Questions tagged [mod-vhost-alias]

36 questions
3
votes
2 answers

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 hosts (4000-5000) mod_macro does not suit me. I'm…
ALex_hha
  • 1,345
  • 15
  • 16
3
votes
1 answer

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 look for sites?
Kyle Hotchkiss
  • 10,754
  • 20
  • 56
  • 82
3
votes
2 answers

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.conf file in the sites-available…
Go0se
  • 98
  • 1
  • 8
3
votes
2 answers

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 evidentally fixed this sometime ago and the brief notes…
JamesHoux
  • 2,999
  • 3
  • 32
  • 50
3
votes
2 answers

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 that routes to my server's IP address out of a…
ringmaster
  • 2,879
  • 3
  • 28
  • 31
2
votes
2 answers

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.' urls are working fine, however with the 'www.'…
ajmedway
  • 1,492
  • 14
  • 28
2
votes
1 answer

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 also pointing to the /var/www/dev/any.ms/public…
Gander
  • 1,854
  • 1
  • 23
  • 30
2
votes
2 answers

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. Now most requests that match any rewrite rule end…
Jens
  • 5,767
  • 5
  • 54
  • 69
2
votes
0 answers

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. ServerName *.abc.com ServerAlias *.abc.com ServerAdmin webmaster@abc.com …
1
vote
1 answer

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

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 amount of Levels may vary) and their…
Leander Hass
  • 162
  • 2
  • 3
  • 13
1
vote
1 answer

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.html > /var/www/test.oblik.dev/foo.html ... I've…
dodov
  • 5,206
  • 3
  • 34
  • 65
1
vote
2 answers

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 structure is like this: /var/www/site /var/www/betasite…
Munim
  • 6,310
  • 2
  • 35
  • 44
1
vote
1 answer

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 directory…
Chuck Burgess
  • 11,600
  • 5
  • 41
  • 74
1
vote
1 answer

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?
rzx10r
  • 134
  • 1
  • 1
  • 9
1
vote
2 answers

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 possible with NGINX? if so how?
Keegan 82
  • 394
  • 2
  • 11
1
2 3