virtualhost

How to debug an apache virtual host configuration?

眉间皱痕 提交于 2019-11-27 10:20:43
Once again, I have a problem with my apache virtual host configuration. (The default configuration is used instead of my specific one). The problem is not really the misconfiguration but how to solve it. Does anyone has good advices to do resolve this kind of problem quickly? Some more informations. The default conf file is this one: NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow

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

吃可爱长大的小学妹 提交于 2019-11-27 09:57:12
问题 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

Access virtual host from another machine over LAN

廉价感情. 提交于 2019-11-27 05:13:03
问题 I am using Windows 7 with Wamp 2.2 server. I have setup 2 virtual hosts: www.project1.com and www.project2.com . I have modified the " hosts ", the httpd.conf, and the httpd-vhosts.conf files, to the changes I mentioned below. Using my browser, when I type www.project1.com or www.project2.com , I successfully get my web pages opened on the laptop that has the server installed on. Changes in the " hosts file ": I've appended the followings to the end of the file:- 127.0.0.1 localhost 127.0.0.1

Why is my PHP source code showing?

落爺英雄遲暮 提交于 2019-11-27 04:46:14
问题 So, I added the following to my http.conf file: Listen443 NameVirtualHost *:443 <VirtualHost *:443> DocumentRoot /PATH_TO/www ServerName www.domain.com SSLEngine on SSLCertificateFile /PATH_TO/domain.crt SSLCertificateKeyFile /PATH_TO/domain.key SSLCertificateChainFile /PATH_TO/intermediate.crt </VirtualHost> https://www.domain.com works now, but it displays the PHP source code? What could be the reason for this? 回答1: "Server configuration error" is the reason ;-) It is choosing to serve PHP

PHP - a different open_basedir per each virtual host

给你一囗甜甜゛ 提交于 2019-11-27 04:33:41
问题 I've came across on this problem, I have a sever running apache and php. We have many virtual hosts but we've noticed that a potentially malicious user could use his web space to browse other user's files(via a simple php script) and even system files, this could happens due to the php permissions. A way to avoid it is to set the open_basedir var in php.ini, yhis is very simple in a single host system, but in case of virtual hosts there would be a basebir per each host. Ho can I set dis

How can I eliminate slow resolving/loading of localhost/virtualhost (a 2-3 second lag) on Mac OS X Lion?

陌路散爱 提交于 2019-11-27 04:10:06
问题 Since setting up my development environments on Mac OS X Lion (brand new macbook air purchased in January 2012), I have noticed that resolving to a virtual host is very slow (around 3 seconds) the first time but after that is fast as long as I continue loading it regularly. If I leave it untouched for a couple of minutes and then reload again, the first reload is (again) painfully slow; seems like something is being cached. As can be seen below I am not using the .local TLD. My setup: Apache

Nginx TCP forwarding based on hostname

喜你入骨 提交于 2019-11-27 02:49:44
With the release of TCP load balancing for the Nginx community version, I would like to mix OpenVPN and SSL pass-through data. The only way for Nginx to know how to route the traffic is via their domain name. vpn1.app.com ─┬─► nginx at 10.0.0.1 ─┬─► vpn1 at 10.0.0.3 vpn2.app.com ─┤ ├─► vpn2 at 10.0.0.4 https.app.com ─┘ └─► https at 10.0.0.5 I have taken a look at the TCP guides and the module documentation , but it doesn't seem well referenced. If anyone can point me to the right direction, i'd be grateful. Related question on ServerFault: Can a Reverse Proxy use SNI with SSL pass through?

XAMPP (Mac) Virtual host showing 403

*爱你&永不变心* 提交于 2019-11-27 02:40:52
问题 I keep getting Access Forbidden Error 403 when I try running my installation of XAMPP on my MAC I am running the project outside of /Applications/XAMPP/htdocs . It's in my /Users/my_user_name/Projects/ directory. Every time I try and go to my virtualhost I get a 403 error: Access forbidden. I have edited my httpd-vhosts.conf file and I have allowed Virtual hosts in httpd.conf. I have also set the User and Group to User my_user_name and Group Admin in httpd.conf I even tried chmoding all my

Creating Wildcard Sub Domain Using Apache VirtualHost

空扰寡人 提交于 2019-11-27 01:37:20
问题 I want to have this situation : if user request using this URL : example.com or www.example.com , user will see index.php in this directory /home/admin1/public_html/ but when user request using other sub domain (wildcard) for example : freediscount.example.com , user will see index.php in this path : /home/admin1/public_html/userweb/freediscount.example.com technical support on my hosting suggest me to use this method : http://www.wiredstudios.com/php-programming/setting-up-wildcard-dns-for

WAMP Virtual Host not working

我与影子孤独终老i 提交于 2019-11-27 01:23:52
问题 I am using a wamp version 2.5 My Apache is 2.4.9 PHP: 5.5.12 MySQL: 5.6.17 I have these configurations: On my httpd.conf # Virtual hosts Include conf/extra/httpd-vhosts.conf On my G:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhost.conf # Virtual Hosts # # Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to