virtualhost

How to get .htaccess files working with Apache VirtualHost

痞子三分冷 提交于 2019-12-22 03:43:32
问题 My problem is that my .htaccess file on my local server is not being read. The settings in the VirtualHost file seem to always take precedence. I have tried the following: Enabled mod_rewrite Changed the AllowOverride to All but this causes a HTTP Error 500 Internal server error . I have tried it with various options but it always causes a 500 error. I am using a VirtualHost file on Ubuntu which looks like the following: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /web

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

↘锁芯ラ 提交于 2019-12-21 23:22:01
问题 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?

Virtual host not working in zend framework

狂风中的少年 提交于 2019-12-21 21:40:56
问题 Following is my virtual host in /etc/apache2/sites-available: <VirtualHost *:80> DocumentRoot "/var/www/roomstays/public" ServerName roomstays #This should be omitted in the production environment SetEnv APPLICATION_ENV development <Directory "/var/www/roomstays/public"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> Also it enabled on /etc/apache2/sites-enabled folder And following is my host file: 127.0.0.1 localhost

Multiple domain with the same ip and port in apache

£可爱£侵袭症+ 提交于 2019-12-21 20:50:10
问题 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

Virtual server on virtualmin keeps redirecting to wrong website

删除回忆录丶 提交于 2019-12-21 19:51:47
问题 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

Wildfly / Undertow : Multiple aliases for one host

喜欢而已 提交于 2019-12-21 13:43:12
问题 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. 回答1: 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=

Multiple vhosts on one and the same docker container

别等时光非礼了梦想. 提交于 2019-12-21 10:44:12
问题 I'm trying to run two different domains on one and the same Docker container and port. The Docker container runs CentOS. docker-compose.yml looks like so: web: image: fab/centos ports: - "80:80" volumes: - ./src/httpd.conf:/etc/httpd/conf/httpd.conf - ./src:/var/www/html - ./src/hosts:/etc/hosts environment: - VIRTUAL_HOST=dummy.dev,tests.dev I also declared both .dev domain names inside of /etc/hosts on the host computer (OS X.) It's been a while since I configured virtual hosts. My

How to configure multiple Virtual Hosts on AWS EC2 Running Ubuntu? [closed]

百般思念 提交于 2019-12-21 05:18:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 months ago . I'm trying to configure a virtual host to my EC2 instance. I'm using ubuntu on my EC2 instance and apache2 as web server. I have 3 applications (web-based) in 3 different folders in /var/www: - /var/www/app_A - /var/www/app_B - /var/www/mywebsite I want people to only be able to access app_A and app_B using IP

Apache - Domain for localhost to access folders as http://folder.local

风流意气都作罢 提交于 2019-12-21 05:15:15
问题 I'm running XAMPP on Ubuntu and I'd like to create a virtual host for my projects, so that I have a tld assigned to my server root directory (for example .local) and folders inside it accessible through URLs as http://foldername.local . Also, how much more complicated would it be to use .htaccess to have http://someotherdomain.local redirect to the /foldername path in the server root? 回答1: I've managed to do it on my own. It is possible to do it, however you'll need to install a DNS server .

MAC OS X: MAMP Environment & Virtual Hosts

被刻印的时光 ゝ 提交于 2019-12-21 04:52:14
问题 I'm not sure what's happening here, but I'm running MAMP 1.9 on MAC OS X. In my httpd.conf file, the DocumentRoot is set to the default htdocs path. Within the htdocs folder, I've created a number of "subsites" in an effort to set them up as Virtual Hosts.... I can get to the paths specified, but they all seem to default to the first one I set up. Essentially, the first VirtualHost I configured was for site1.localhost.com. I've since configured site2.localhost.com and site3.localhost.com.