Ubuntu Installation :: Setting Up Virtualhost Apache?
Aug 22, 2011
I am setting up a VirtualHost on my Apache. I am quite not familiar with Ubuntu setup so I am wondering what will I do with the 000-default file (which contains a template of virtualhost syntax)? What filename will I save it to?
I am trying to add a virtual host to my machine by name to the IP here.It absolutely refuses to work.it is a mess server I hope to upgrade soon, but it has 2 versions of apache running together on it.The first one (php3) just proxies all the requests from 80 to 8080 which has another instance of apache running php5.I don't know what else to do, it keeps defaulting to the host header error virtual host.
I'm setting up a full server configuration on Fedora, moving it from Mandriva which sadly faces a rather uncertain future. Things are going well and I will be ready (and more familiar with Fedora) in time to upgrade to Fedora 15.
What I have done so far in regard to networking setup:
I first removed Network Manager and replaced it with the network service (chkconfig --level 25 network on). That put an end to the overwriting of /etc/hosts, which now reads simply:
When starting Apache I get this error in 10.10 (not in 9.10): [Fri Dec 03 21:14:22 2010] [error] (2)No such file or directory: could not open transfer log file /etc/apache2/${APACHE_LOG_DIR}/other_vhosts_access.log. Unable to open logs So where do I define APACHE_LOG_DIR ?
I had a server running Debian testing and an update borked my Apache 2.0 server. So after several hours of config edits, changes, and WTF?!?!'s I decided to remove it (Via Apt). I then downloaded the source from apache's site and did the whole ./configure, make, make test, make install, and that's all done now. But I have no idea past this right now to get my server up and running. Here's my site
[URL]
I have a 2wire router, setup so that the server has no firewall on it. There is no UFW installed on my Debian machine either. I'm running kernel 2.6.32 right now. When I localhost on my machine it goes to the site, but when I enter the IP of the machine on a different PC on the same LAN, it won't show up. When navigated to on a machine not on the LAN, I get a 502.
I am trying to set up an Apache2 virtual host to test sites I make from my own computer.
I used this guide to set up my LAMP and vHost, The LAMP stack seems to be working great, but I run into some problems when I try to set up a vHost
As described in the guide I
1. made a new directory in my home folder /home/[myname]/www/test.dev to put my site in (it currently contains a simple index.html file as a test).
2. In /etc/apache2/sites-available I copied the file "default" and renamed it "test.dev"
3. I edited the content of "test.dev" to look like this:
Code:
4. I enabled the site using the command "sudo a2ensite test.dev". I then restarted apache "sudo /etc/init.d/apache2 reload".
5. I edited the hosts file: "sudo gedit /etc/hosts" to look like this:
Code:
6. I restarted apache "sudo /etc/init.d/apache2 reload".
Now if I enter "http://test.dev" in my firefox's adress bar I just get the apache2 "It works!" site. What is going wrong to cause firefox to show the "It works!" page rather then my own test site?
Today I tried to install an apache web server on my second home computer. Here is what I have done: - installed ubuntu server edition (Jaunty) - installed apache2 - made my ip address static - forwarded port: 21, 80, 5900 on my router
If I now go to http://192.168.62.58 then it shows "It Works!". So the server is running in my home network. For users outside my home network the ip address is 82.168.191.101. If a friend of me goes to that address, then it does not work. Also I have tried to link this address to myhomeserver.dyndns.org for testing, but that does not seem to work either.
Now I got my doubts about the following: I'm using a router on which 4 computers are connected. I do not know for sure, but if someone connects to myhomeserver.dyndns.org, then how does it know to which computer it should connect? Isn't there a way to fix the connection to the server?
I am setting up a local YUM repository in which I will have one computer accessing the RHN network and the clients will pull the updates from that server.
I have seven linux computers that I need to have access this repo server via apache.
I called Red Hat support and this what they told me to do....
On the YUM Repo Server - > go to /etc/httpd/conf > copy original to something else (you name, just save the original) >edit the httpd.conf file > add in ServerAdmin root@10.24.79.195
[Code].....
how to configure apache -- when I was on the phone with Red Hat we went so fast that I couldn't write down everything.
Vanilla install of Karmic (64 bit) - would like to change the Apache doc root to point to /home/sam/www as it's my web development machine. (Default install is working fine) Created copy of 'default' to 'mylocal' in '/etc/apache2/sites-available'
Code: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/sam/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/sam/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ...
The permissions on the folder in my home dir: Code: sam@rocket:~$ ls -la ww* total 16 drwxrwxrwx 2 sam sam 4096 2010-01-09 22:26 . drwx------ 35 sam sam 12288 2010-01-09 22:11 .. -rwxrwxrwx 1 sam sam 100 2010-01-09 22:27 index.html sam@rocket:~$ pwd /home/sam sam@rocket:~$ The sites enabled set up:
Code: root@rocket:/etc/apache2# ls -la sites-enabled/ total 8 drwxr-xr-x 2 root root 4096 2010-01-09 22:24 . drwxr-xr-x 7 root root 4096 2009-12-20 00:22 .. lrwxrwxrwx 1 root root 26 2010-01-09 22:24 mylocal -> ../sites-available/mylocal But I still get: "Forbidden You don't have permission to access / on this server".
Setting up my Squeeze test box, I can't seem to get APache2 to find index.html. It keeps coming up with the initial "It works!" page.
On my Squeeze server, the /etc/apache2/httpd.conf file contains this line: DocumentRoot /home/www_local and that box serves the website perfectly.
On the test box, I created the /home/www_local directory and put an index.html file in it, then populated /etc/apache2/httpd.conf with exactly the same DocumentRoot line and restarted Apache. Still the same result -- Apache isn't finding my index.html file. I have grep'ed all the files in /etc/apache2 and /etc/apache2/conf.d looking for 'DocumentRoot' and it's not in any of them.
I just installed AWStats on a new server and can't get perl to properly work as a cgi in apache. I've done this before and got it to work, and I've tried a couple suggestions found from google with no luck. When I try to access [URL] from my browser, Apache doesn't give any errors or anything, it just outputs the perl file in plain text, which implies that it's not handling the .pl file as a perl cgi, but I just don't know why.
I applogies if this doesn't fit or if this is right in from of my face but, I'm a bit confused.I'm trying to configure a few VirtualHost in apache2. I currently a default virtualhost and 2 other sites. No matter which domain I visit I still get the default page.. My Confusion is, I've been reading and some places seem to say that my virtual hosts should be in /etc/apache2/sites-enabled/*Config File* and other seem to say it should be in /etc/apache2/httpd.conf what the awsner... I've tried both ways with no success .... If I put NameVirtualHost in httpd.conf I get an error saying their are no virtual hosts.
Ive made a site on my Ubuntu server and link the folder where it is with VirtualHost. The problem is, when i place mypage.com works, when try www.mypage.com goes to the apache "It Works" page.
I'm sure it's a minor mistake; these are the steps I've taken currentdomain: domain i already have, and works. newdomain: domain i newly bought.
[Code]....
This is to make sure the files are actually there, this subdomain works... simply pointing to the same folder
[Code]...
- all ipadresses in the hosting service of the domain thing is pointing to the vps. - Within the vps that servername is directed to the directory /var/www/the_directory - That directory holds the actual website files. This is proven with the subdomain method.
We'll yesterday I got a new server and just installed Linux Debian. The thing is it's been so long (for over 5 years) that was the last time I set up virtualhosts in apache. The thing is I googled around a bit and supposedly my virtualhosts are OK, but I get this WARN when I restart apache2:
I didn't know exactly where to put this, but here it goes:For the record, I have Apache2 on Ubuntu.OK so I have a "svn" subdomain for SVN repositories. The repositories are actual separate repositories, not a big one for all. So I'm using SVNPath not SVNParentPath (please don't suggest this as a possible fix).
The problem is I want to be able to list the repositories (or even put a blank page for that matter) at svn.mydomain.com. All repositories have a svn.mydomain.com/myrepository path with a VirtualHost for each. So when I create another VirtualHost just for the / path, it overrides all the SVN VirtualHosts, as it covers / and all sub-directories.
I would like a way to set that VirtualHost to affect just the root directory, without the sub-directories. Or to make the SVN VirtualHosts override it. Either way, is this possible? What approach should I take? Thanks!
I currently am running 10.04.1 and have successfully setup my home web server to run a single website. My current settings are:
-I have registered the domain name annarrankings.com through godaddy -A record is - host = @ and points to = 71.114.220.3 -CName is - host = www and points to = @ -on my server I have the site running in /var/www
I've done some research and found that to run multiple websites I need to setup VirtualHost.
-So I created a folder /var/www/annarrankings.com and moved my site to that folder
-Edited Apache2.conf to add the following line
-I then went to /etc/apache2/sites-enabled and copied the default file to a new file called annarrankings.com. Here's the annarrankings.com file after I edited it
-I then created a link in /etc/apache2/sites-enabled to the annarrankings.com file in /etc/apache2/sites-available
-Next I editied /etc/hosts
-When i went to enable the site using a2ensite annarrankings.com I got the following
I figured this was ok since I had already created a symbolic link earlier (a result of trying to following multiple tutorials and ..... videos at once) so I reloaded apache2. I created an index.html file in /var/www/ just for testing purposes and when I load www.annarrankings.com I get the file located in /var/www/ instead of the website located in /var/www/annarrankings.com Do I need to change my A record or CName in godaddy or did I just do this completely wrong?
I currently use 192.168.1.10:85 to refer to my localhost ip address, and I setup port-based virtualhosts because this seems like the only feasible/practical way to view this from within Windows XP on my Debian's VirtualBox. Is anyone else aware of some advanced techniques in which I could view it by the ServerName instead? I would assume I have to hook it up to some sort of DNS server? I know I can also edit the hosts file in my Windows XP and point certain urls to my IP address, but it will always resolve to the primary default virtualhost.
I am a novice with linux but I pick up stuff pretty quick so far I have been able to figure everything else out except this, I have read all the documentation on apache 2 and getting virtual hosts to work and it appears I have everything setup right but yet I still can't get it to work, I have googgled my brains out and I still can not figure out whats going on here is my setup.I have two websites that I am trying to get to load[URL]I have webmin installed and I'm using their utilities to setup virtualhost. heres how it looks in my http config:NameVirtualHost 24.189.245.44:80 ( I have tryed * in place of my external ip)
I am a brand new ubuntu user, heard lots of good things about it so thought I would give it a go on my laptop. However, I have tried installations of Ubuntu 10.04 (notebook version) and Xubuntu. Yet on both attempts to install the OS it has stalled at the "Setting up the clock" dialogue box, it just sits at 0% and remains frozen (mouse still moves etc but nothing happens).
I really want to give Ubuntu / Xubuntu a go and my forum trawling has brought nothing to light so far.
Is this possible? I was able to do this with Debian 6 no problem. The installation interface is really nice but seems to be lacking any way to do more advanced configurations. Is there some boot option I can pass in?
I needed to get rid of apache2 on my Ubuntu. apt-get remove apache2All looked successful but... ps aux... Oh look it's still running. No matter, I thought, maybe I'll just restart (restart on Linux!? I must be mad!) and it'll just disappear. Nope, it still starts up like it always has.I could of course just manually remove it.... but it feels so untidy.