virtualhost

How do I make Apache know which app directory to use for different domains?

折月煮酒 提交于 2019-12-04 17:18:29
I'm trying to create a site with CodeIgniter. I will have multiple domains served from this server, and what I am trying to do is to separate the HTTP requests for www.example1.com from the ones for www.example2.com and then redirect them to the their correct application folders. Say this is my directory structure: system application example1 example2 So this request www.example1.com/gallery/ would then be redirected to exmaple1 folder. Does anyone have any code example for doing this? Obviously you would need to use the ReWrite module... I looked around the Apache documentation but I couldn't

Virtual server on virtualmin keeps redirecting to wrong website

只愿长相守 提交于 2019-12-04 16:01:31
I have created a virtual server say aaa.com but when I access the site (via editing my hosts file on Windows 7, cos I have a live aaa.com running on the Internet), it brings me to my other virtual server's site I have, like bbb.com Why is that? I don't have any redirection running. Not in my script files (like html or php) and no redirection set under "Server Configurations" -> "Website Redirects" and none at "Services" -> "Click Configure Website" -> "Aliases and Redirects." The only script files I have are fresh new WordPress installation files (under home/aaa/public_html). How do I fix this

Create an Alias Directory inside a Virtual Host

最后都变了- 提交于 2019-12-04 15:56:11
问题 I checked here, here, here, here, and here before asking this question. I guess my search skills are weak. I am using the WampServer version 2.2e . I have a need like, I need a virtual path inside a virtual host. Let me say the two hosts that I have. Primary Virtual Host (Localhost) NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot "C:/Wamp/www" </VirtualHost> My Apps Virtual Hosts <VirtualHost *:80> ServerName apps.ptrl DocumentRoot "C:/Wamp/vhosts/ptrl/apps" ErrorLog

Wordpress redirecting to localhost instead of virtual host when being proxied by Webpack Dev Server

你。 提交于 2019-12-04 13:59:16
I am trying to do a relatively simple set up with: An Apache server with a virtual host for the HTML. Webpack and the Webpack Dev Server for asset reloading and generation. To accomplish this, the Webpack Dev Server proxies the other server to pass through requests that it doesn't know how to handle. Using a basic python server (which works): Start the python webserver on http://localhost:5000 . Run npm start. Webpack Dev Server starts and proxies the python server using http://localhost:9090 . Visit http://localhost:9090 and see HTML result of python server plus Webpack assets. Using Apache

How to setup a tomcat virtualhost without webapps?

老子叫甜甜 提交于 2019-12-04 13:03:19
I am trying to migrate my webapp from resin to Tomcat7 . One thing confuses me is I don't know how to setup a 'default' webapp for one virtual host ? That is , my site has just one app : "/" , located in " /home/destiny/www " . There are many PHP scripts inside (served by apache) , and one WEB-INF directory inside , with a standard JavaEE app. My app is not packaged in WAR , it is default expanded . I try to find documents about how to setup a virtual host in tomcat 7 , but all examples need a 'webapps' directory for WARs to expand , but that's not my case ! Here is my server.xml settings

Multiple domain with the same ip and port in apache

偶尔善良 提交于 2019-12-04 11:45:52
I want to bind two different domain in my VPS with the same ip and port, here is my httpd.conf : <VirtualHost 106.187.96.123:80> DocumentRoot /home/roy/sobuhu ServerName aaa.com </VirtualHost> <VirtualHost 106.187.96.123:80> DocumentRoot /disk1/allen/www ServerName bbb.com </VirtualHost> <VirtualHost 106.187.96.123:80> DocumentRoot /disk1/allen/www ServerName www.bbb.com </VirtualHost> Can I config the ServerName use syntax like *.bbb.com ? so I can access www.bbb.com、bbs.bbb.com with the DocumentRoot /disk1/allen/www . Now I visit bbs.bbb.com, it will turn to /home/roy/sobuhu .

%0 is not replaced by server name when used with Apache's ProxyPassMatch

本秂侑毒 提交于 2019-12-04 11:25:28
Problem: %0 is not replaced by server name (i.e. test.local) when used with ProxyPassMatch. <VirtualHost *:80> UseCanonicalName Off # %0 is replaced by server name (works) VirtualDocumentRoot /Users/mattes/sites/%0 # %0 is replaced by an empty string (problem!) ProxyPassMatch ^(/.*\.php)$ fcgi://127.0.0.1:9000/Users/mattes/sites/%0/$1 </VirtualHost> Work-around: I found an interesting blog post here: http://holtstrom.com/michael/blog/post/225/Apache-2.2-Proxy.html . Basically, Michael uses RewriteEngine to save variables for later usage. Something like this will work, for example: <VirtualHost

How to create a virtual host with vagrant and chef

☆樱花仙子☆ 提交于 2019-12-04 11:22:49
I've setup my first vagrant machine, with some cookbooks downloaded through knife. I am stuck with the setup of a virtual host. Here's my Vagrantfile: Vagrant.configure("2") do |config| config.vm.box = "precise32" config.vm.box_url = "http://files.vagrantup.com/precise32.box" config.vm.network :forwarded_port, guest: 80, host: 8080 config.vm.network :private_network, ip: "192.168.33.10" config.vm.provision :chef_solo do |chef| chef.json = { "mysql" => { "server_root_password" => "admin", "server_repl_password" => "admin", "server_debian_password" => "admin" }, "apache" => { "listen_address" =>

creating virtual hosts on a vagrant box

孤人 提交于 2019-12-04 09:59:09
问题 I am trying to setup a development environment based on vagrant provisioned with Chef. I created an environment with Apache (used Chef) and can access web server from my host machine with port forwarding. I'd like to make my vagrant box to contain several virtual hosts and with shared folders I will define different projects pointing out same box and related virtual host. What I need to learn is whether there is a Chef-way to create virtual hosts for apache (it maybe other web servers, eg.

Wildfly / Undertow : Multiple aliases for one host

天涯浪子 提交于 2019-12-04 09:07:52
In standalone/configuration/standalone-full.xml , I've declared the following host, that works <host name="webhost" alias="gateway.example.com" /> When I try to add another alias, I'm given Error 404. <host name="webhost" alias="gateway.example.com www.gateway.example.com"/> The DOCUMENTATION says list of aliases is whitespace separated. There was a bug in documentation. It is comma separated list of hosts not white space separated. example would be <host name="default-host" alias="localhost, some.host" > I also fixed documentation to to address this 来源: https://stackoverflow.com/questions