virtualhost

Apache - how to map prefixes to different directories

大憨熊 提交于 2019-12-06 08:10:34
Is it possible to configure Apache to allow different prefixes (instead of www) to map to different directories in the file system? For example... I have two different environments on my webserver: /home/me/test/web : Test Environment /home/production/web : Production Environment I would like these to map to these urls: test.mysite.com -> /home/me/test/web prod.mysite.com -> /home/production/web However, nothing I've tried with VirtualHosts has worked: NameVirtualHost *:80 <VirtualHost *:80> ServerName test.mysite.com ** Some SetEnvs ** </VirtualHost> <VirtualHost *:80> ServerName prod.mysite

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

只谈情不闲聊 提交于 2019-12-06 07:43:40
问题 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.

Creating subdomain in virtualhost in apache 2.0 on CentOS 6.4

天大地大妈咪最大 提交于 2019-12-06 06:17:57
I need to create subdomains on a web server with apache 2.0 , CentOS 6.4, PageSpeed ​​+ Apc. I have no DNS server. I need to use VirtualHost. My code: NameVirtualHost xx.xx.xx.xx <VirtualHost xx.xx.xx.xx> ServerName www.sub.domain.com ServerAlias sub.domain.com DocumentRoot /var/www/html/sub </VirtualHost> <VirtualHost xx.xx.xx.xx> ServerName www.domain.com ServerAlias domain.com DocumentRoot /var/www/html </VirtualHost> I have put this code in: /etc/httpd/conf.d/somename.conf and it does not work. Also in: httpd.conf , does not work. I'm doing the following: <VirtualHost *:80> DocumentRoot "

Strategy for CORS - issue with IE10 : xhr status returns 0 for HTTP 401

混江龙づ霸主 提交于 2019-12-06 05:54:27
问题 I have the following setup on my server: Apache HTTP Server is serving a BackboneJS frontend application Apache Tomcat is serving a Java based backend (CORS enabled). Everything is running on a single server that I have full control over. I'm currently using com.thetransactioncompany.cors.CORSFilter in the Java based backend to enable CORS. Everything seens to be working fine. My frontend has the following code to redirect the user to the login page in case an un-authenticated REST call

nginx, thin, and multiple hosts

独自空忆成欢 提交于 2019-12-06 05:43:42
问题 I am trying to set up multiple domains on my server running nginx + thin. For example, I would like www.domain1.com and www.domain2.com to go to different apps with different root paths to their respective apps. If you are familiar with nginx, I have posted my nginx.conf file at the bottom of this post. I was thinking I could just try having multiple server blocks, but then I ran into a problem where the server would default to choosing a random thin port and both domains went to the same app

VirtualHost Same ServerName Different Directories

纵饮孤独 提交于 2019-12-06 03:43:05
I have a running production website assigned to a host (redmine application). I need to add a new application to the same host as a sub-directory. This is the current virtualhost configuration for redmine application which runs at base folder of host. <VirtualHost *:80> ServerName redmine.hostname.com DocumentRoot "C:/BitNami/redmine-2.5.1-1/apps/redmine/htdocs/public/" RewriteEngine On RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA] ProxyPass / balancer://redminecluster ProxyPassReverse / balancer://redminecluster <Proxy balancer://redminecluster> BalancerMember http://127

running multiple java jetty instances with same port (80)

 ̄綄美尐妖づ 提交于 2019-12-06 01:48:28
问题 For Example: I am having one primary temp domain www.product.com For each client i need to have separate sub domain mapped to same server with same port(80) but with different instance name (different .wars files) www.client1.product.com www.client2.product.com www.clientn.product.com (correct me if i am wrong) As i know if i start jetty instance , each will start at seperate port no's client1 war will start at port 3001 client2 war will start at port 3002 client3 war will start at port 3003

What is the difference between “always” and “onsuccess” in Apache's Header config?

不羁岁月 提交于 2019-12-05 13:52:57
I have a website where virtual hosts are defined in /etc/apache2/sites-enabled/ with a header being set with the always option like this: Header always set X-Frame-Options DENY If I now set the same header using .htaccess in the web site's root folder, but without always then the header is returned twice in the server's response. The setting in .htaccess (amongst others): Header set X-Frame-Options DENY The server's response: HTTP/1.1 200 OK Date: Mon, 02 May 2016 16:02:29 GMT Server: Apache/2.4.10 (Debian) X-Frame-Options: DENY Cache-Control: no-cache, no-store, must-revalidate, private

How do I setup VirtualHosts to point two ports on same IP to different ServerNames?

若如初见. 提交于 2019-12-05 11:19:30
I have set up the wiki software Gitit to run on two separate ports of the same Apache server (ports 1848 and 4000). I've confirmed that they are running: http://wcaleb.rice.edu:4000 http://wcaleb.rice.edu:1848 Now I want to proxy these two sites to prettier URLs, like http://wiki.wcaleb.rice.edu and http://hist118.wcaleb.rice.edu . The IP address for both is 128.42.173.84 My server admin has added DNS entries for these names, but I can't seem to get my Apache configuration to work. Following the instructions here , I tried to set up a VirtualHost like this: NameVirtualHost *:1848 <VirtualHost

How to make a tumblr style profile url

笑着哭i 提交于 2019-12-05 11:01:42
I wonder, how does tumblr doing profile url like this: http://www.username.tumblr.com/ http://username.tumblr.com/ I know we can change the profile url http://www.website.com/profile.php?user=username to http://www.website.com/username using the following RewriteRule RewriteRule ^([^/]+)/?$ profile.php?user=$1 [L,QSA,NC] I don't know how tumblr doing those profile urls. How can we make user profile urls like this: http://www.username.website.com/ http://username.website.com/ I have a VirtualHost. Key solution: wildcard subdomains . This allows you to make *.domain.com point to your server.