I am having problems in implementing the virtual hosts here in my server. I have this one cloud dev server: Amazon Linux AMI release 2013.03 (based on RHEL like CentOS) with Apache 2.2.25 installed and I'm trying to create 2 virtual hosts: test-kalc.tk and test2-kalc.tk.
If I go to test-kalc.tk, the expected output should be "Hello from test-kalc.tk!" and I have no problems seeing that. The output for test2-kalc.tk should be "Hello from test2-kalc.tk!" but I don't know why every time I go to test2, I still see the same page from my first host.
I googled about this and checked other forums out there but I still couldn't find the answer to this.
Here's my /etc/httpd/conf/httpd.conf:
I've already tried changing *:80 to * and also tried using the IP address (private/public) but that didn't help me either.
The hosts were also included in /etc/hosts.
Here are the other info that you might need:
Let me know if you need anything else.
Hi Scrutinizer, thanks for the time but I was able to find a fix to this finally. What I did was I changed NameVirtualHost *:80 to NameVirtualHost test-kalc.tk and added a new NameVirtualHost for test2-kalc.tk.
Here's how they look like:
I also changed <VirtualHost *:80> to <VirtualHost test-kalc.tk>. I did the same thing to other host.
I have installed apache2 on ubuntu 16.00 and checked the logs and no errors
apt list --installed | grep apache2
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
apache2/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.5 amd64 ... (0 Replies)
hi,
Earlier I had this thread posted on "UNIX for Experts" Group here in unix.com, but somehow no one bothered to respond, so I thought someone might be able to help me here.
In short,
I have to make accessible a directory via SVN to all 5 developers, call it /var/www/html/beta3
... (0 Replies)
Hello,
My apache user generate one file :
# ls -lsa /tmp/reference_file.csv
76 -rwxrwxrwx 1 apache apache 69921 Aug 16 14:14 tmp/reference_file.csv
the user and the group belong to apache, but when i am trying to change it :
su -l apache -s /bin/bash
-bash-3.00$ whoami
apache... (7 Replies)
Hi,
I use debian jessie, apache. I am not allowed to post links here at this forum, I am new user.
I made subdomain porodin.predicsasa.com and it is working, vhost file is porodin.conf in /etc/apache2/sites-available
then I copied vhost file and made it hosting.conf, did a2ensite hosting and it... (5 Replies)
I'm trying to set up two virtual hosts. Here's my httpd config:
<Directory /Users/userX/dev/sandbox-2>
Order deny,allow
deny from All
Allow from localhost
</Directory>
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "/Users/userX/dev/sandbox-2"
... (0 Replies)
can anyone help me to write a script to delete the virtualhost entry in apache vhosts.conf file:
hint: when i enter ./deletedomain test.com it should delete the test.com virtualhost entry from vhosts.conf file (2 Replies)
Hello,
I have have installed two web applications on one server with one IP address and one domain name (mynet.intra). Is it possible to configure in apache 2.2 that access to one application would be from "app1.mynet.intra" and to another application from address "app2.mynet.intra"? Document... (1 Reply)
Hi,
I am facing some problem with Apache to Tomcat forwarding. I have Tomcat (6.0.18) behind Apache (2.2). I want to use ‘https' for receiving request from the client. This request, when forwarded by Apache to Tomcat, will use ‘http'. My application's name is ‘abc', which is deployed in... (1 Reply)
I've set up a forward proxy within a VirtualHost (see below) on Apache 2.2.11. I then browse using mydomain.com:80 as the proxy - I've also tried using the IP address of the VirtualHost xxx.xxx.xxx.xxx:80. It works fine, the only problem is that in both cases the server's main IP address is always... (2 Replies)
I have just configured httpd.conf on a new Redhat 9 install. Below are my additions to httpd.conf. Everything works fine except that when typing http://spetnik.d2g.com into my web browser, I am sent to the "Default catch all" site. Any clues?
NameVirtualHost *:80
#Default catch all ... (5 Replies)