virtualhost

mod_rewrite in vhosts configuration

╄→гoц情女王★ 提交于 2019-11-29 06:31:26
I'm trying to add mod_rewrite rules in the vhost config but it's not working. For the site "mysite.com" I want to redirect "/webmedia/" to the home page . Here is what I have: <VirtualHost 192.168.100.142:80> ServerAdmin serveradmin@bbgi.com DocumentRoot /home/drupal_1 ServerName mysite.com ServerAlias www.mysite.com Alias /movies /home/movies/ ErrorLog /var/log/httpd/mysite.com_err_log CustomLog /var/log/httpd/mysite.com_log special <Directory /home/drupal_1> Options FollowSymLinks Includes ExecCGI AllowOverride All DirectoryIndex index.html index.htm index.php # Rewrite Rules ###############

Subdomain on localhost

安稳与你 提交于 2019-11-29 04:03:39
问题 I would like to create a registration form which creates subdomains (yet on localhost), but I have got some problem. I know how to create subdomains, writing for example these in vhosts: <VirtualHost *:80> ServerAdmin webmaster@dummy-host.hleclerc-PC.ingenidev DocumentRoot "C:/wamp/www/something/" ServerName localhost ServerAlias something.localhost ErrorLog "logs/error.log" CustomLog "logs/access.log" common </VirtualHost> And put this line in hosts: 127.0.0.0 something.localhost It's

Different VirtualHosts with the same port

我与影子孤独终老i 提交于 2019-11-29 02:18:54
问题 I need to have two VirtualHosts with the same listen port for different projects and with different logs. Here's what I've got: <VirtualHost *:80> DocumentRoot /home/projects/smk ErrorLog /var/log/apache2/smk-error.log RedirectMatch ^/$ /cms </VirtualHost> <VirtualHost *:80> DocumentRoot /home/projects/smk/cms ErrorLog /var/log/apache2/smk-cms-error.log </VirtualHost> <VirtualHost *:80> DocumentRoot /home/projects/smk/deploy ErrorLog /var/log/apache2/smk-deploy-error.log </VirtualHost> 回答1:

setting up laravel on IIS7

点点圈 提交于 2019-11-28 22:08:31
I want to set up my IIS7 server in order to let it works with a web application written in laravel (php framework). I found something similar for CI ( link ) but it doesn't work on laravel (of course I removed the index.php redirection). actually only home page works ( www.mysite.com/public ) anybody uses/d IIS7 with Laravel? thanks in advance I created the web.config file in root folder inside <configuration></configuration> : <system.webServer> <defaultDocument> <files> <clear /> <add value="index.php" /> <add value="default.aspx" /> <add value="Default.htm" /> <add value="Default.asp" />

Vagrant in production

人盡茶涼 提交于 2019-11-28 19:42:48
问题 I've been reading about Vagrant, and I find it quite useful for my development. I am currently managing a series of services (mail, web, LDAP, file sharing, etc.), and often one of these falls and needs a quick backup. Is it possible (and recommended) to use Vagrant for these purposes? So far I've virtual machines installed like real machines. I would also like to know about an alternative to Vagrant which would allow me to setup a simple configuration file and put a virtual machine, for

VirtualHost with wildcard VirtualDocumentRoot

二次信任 提交于 2019-11-28 17:39:34
I'm trying to create a fallback for my virtual hosts. My configuration looks like this: # Fetch all pre-defined hosts Include "conf/extra/vhosts/*.conf" # Fallback NameVirtualHost *:80 <Directory "C:/LocalServer/usr"> Options Indexes FollowSymLinks Includes AllowOverride All Order allow,deny Allow from all </Directory> <VirtualHost *:80> VirtualDocumentRoot "C:/LocalServer/usr/%-1/projects/%-2+/public/" </VirtualHost> The objective here is the following: If I try to access http://test.lab/ , I want it to automatically pick up the following directory: C:/LocalServer/usr/lab/projects/test/public

Different folder as website subfolder

a 夏天 提交于 2019-11-28 17:33:14
问题 I need some help with URL rewriting. The case is similar with this one. I have a working Zend Framework site. Now I must add a blog in Wordpress (also working). I've chosen not to indulge in ZF controller-/action-/route-making; I've seen a couple of tutorials about this and I consider them too much for a "plain" redirection. Now, about that "redirection"... This is how it should look like: www.site.com (points to /var/www/zf ) www.site.com/blog (points to /var/www/wp ) I know that I should

Using a directory in VirtualHost ServerName

一曲冷凌霜 提交于 2019-11-28 17:17:17
I'm currently using name-based virtual host configuration, to server about 5 different websites from the same IP address, just like in the apache documentation: <VirtualHost *:80> ServerName www.domain.tld DocumentRoot /www/domain </VirtualHost> <VirtualHost *:80> ServerName www.otherdomain.tld DocumentRoot /www/otherdomain </VirtualHost> Is it possbile to have something like: <VirtualHost *:80> ServerName www.domain.tld/folderpath DocumentRoot /www/software </VirtualHost> The webpages in this folder are using a different software stack, and I'd like to keep it nicely separate. I tried the

Apache gives me 403 Access Forbidden when DocumentRoot points to two different drives

末鹿安然 提交于 2019-11-28 17:10:47
I am getting an 403 access forbidden when attempting to open a page under a vhost where the document root is sitting on a different drive than where apache is sitting. I installed using the apachefriends release. This is my httpd-vhosts.conf file: NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> ServerName foo.localhost DocumentRoot "C:/xampp/htdocs/foo/public" </VirtualHost> <VirtualHost 127.0.0.1> ServerName bar.localhost DocumentRoot "F:/bar/public" </VirtualHost> When opening bar.localhost in my browser, Apache is giving me 403 Access Forbidden. I tried setting lots of different access

How to select PHP version 5 and 7 per virtualhost in Apache 2.4 on Debian?

雨燕双飞 提交于 2019-11-28 16:20:53
问题 Would it be possible to run PHP 7 and PHP 5 simultaneously in Apache 2.4 on Debian 9? I would like to be able to select the PHP version I wish to use per virtualhost. I believe this would be useful considering that some of my websites still use deprecated PHP features. This allows me to perform upgrades per site. How do I achieve something like this? For example <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName mywebsite.com DocumentRoot /var/www/mywebsite.com # UsePHP 7 <