Apache Server configuration support - Need help setting up my domain name with apache2

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > August 2006 > Need help setting up my domain name with apache2





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Need help setting up my domain name with apache2
joe10001@hotmail.com

2006-07-29, 1:26 am

Hi all,

I'm running apache2 on a debian server. I want to set up my domain name
with the right file in the folder /var/www

My server tree look something like this:
[www]
phpmyadmin -> link
SomeFolder/MyWebSite


At this time, when I type www.mydomainname.com, the default page of
apache2 comes up.

If i want my website to appear I must type
www.mydomainname.com/SomeFolder/MyWebSite in the address bar.

But the idea is that my website appears directly when I enter
www.mydomainname.com. I need to make a link with SomeFolder/MyWebSite

I know that the configuration is with httpd.conf but i'm not sure where
i must make the link. Also, if I make a link so www.mydomainname.com
shows my web site, does that mean that I wouldnt be able to reach
phpmyadmin anymore by typing www.mydomainname.com/phpmyadmin.

tyvm

Steve

2006-07-29, 1:26 am

On Fri, 28 Jul 2006 19:23:20 -0700, joe10001 wrote:

> Hi all,
>
> I'm running apache2 on a debian server. I want to set up my domain name
> with the right file in the folder /var/www
>
> My server tree look something like this:
> [www]
> phpmyadmin -> link
> SomeFolder/MyWebSite
>
>
> At this time, when I type www.mydomainname.com, the default page of
> apache2 comes up.
>
> If i want my website to appear I must type
> www.mydomainname.com/SomeFolder/MyWebSite in the address bar.
>
> But the idea is that my website appears directly when I enter
> www.mydomainname.com. I need to make a link with SomeFolder/MyWebSite
>
> I know that the configuration is with httpd.conf but i'm not sure where
> i must make the link. Also, if I make a link so www.mydomainname.com
> shows my web site, does that mean that I wouldnt be able to reach
> phpmyadmin anymore by typing www.mydomainname.com/phpmyadmin.
>
> tyvm


Modify the line


DocumentRoot "/var/www"


To point to the relevant directory, and reload apache.

hth,

Steve
SwtDivaLove

2006-07-29, 1:22 pm


Steve wrote:
> On Fri, 28 Jul 2006 19:23:20 -0700, joe10001 wrote:
>
>
> Modify the line
>
>
> DocumentRoot "/var/www"
>
>
> To point to the relevant directory, and reload apache.
>
> hth,
>
> Steve


I believe that I'm along the same lines as first person...

I'm still trying to figure out how to host multiple domains on Apache.

Example:

Site 1: www.mydomainname1.com
Site 2: www.mydomainname2.com
Site 3: www.mydomainname3.com

Not sure what I'm doing wrong, but it just doesn't work...

David

2006-07-29, 1:22 pm

SwtDivaLove wrote:
> Steve wrote:
>
> I believe that I'm along the same lines as first person...
>
> I'm still trying to figure out how to host multiple domains on Apache.
>
> Example:
>
> Site 1: www.mydomainname1.com
> Site 2: www.mydomainname2.com
> Site 3: www.mydomainname3.com
>
> Not sure what I'm doing wrong, but it just doesn't work...
>

It is called Virtual Hosts. Try checking out apache.org for it
Ohmster

2006-07-31, 1:25 am

"SwtDivaLove" <colonel_angel2004@yahoo.com> wrote in
news:1154157667.059185.316790@i3g2000cwc.googlegroups.com:

> I believe that I'm along the same lines as first person...
>
> I'm still trying to figure out how to host multiple domains on Apache.
>
> Example:
>
> Site 1: www.mydomainname1.com
> Site 2: www.mydomainname2.com
> Site 3: www.mydomainname3.com
>
> Not sure what I'm doing wrong, but it just doesn't work...


Virtual hosts. It works great, I use it on my home linux machine, fed via
ASDL. Got 3 domains on it and they all work quite well. Here is some info
on how to set it up...

http://httpd.apache.org/docs/1.3/vhosts/

or here is a google search link that will get you going in the right
direction...

http://tinyurl.com/mx9b3

Create the directories where ever you want, setup the virtual hosts in
/etc/httpd/conf/httpd.conf (I put mine right at the bottom, restart
apache, and you are there, dude.

I think that there is a commented out sample virtual host section at the
bottom of your httpd.conf file that you can uncomment and then copy and
paste more sections as you need them, configuring each one accordingly.
Yeah, here, I did not even uncomment and use the sample, I just left it
and made my own right under it. Works like a charm!


### Section 3: Virtual Hosts
#
# VirtualHost: 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 worry
about
# IP addresses. This is indicated by the asterisks in the directives
below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>


--
~Ohmster
SwtDivaLove

2006-08-01, 7:28 pm

Ohmster wrote:
> "SwtDivaLove" <colonel_angel2004@yahoo.com> wrote in
> news:1154157667.059185.316790@i3g2000cwc.googlegroups.com:
>
>
> Virtual hosts. It works great, I use it on my home linux machine, fed via
> ASDL. Got 3 domains on it and they all work quite well. Here is some info
> on how to set it up...
>
> http://httpd.apache.org/docs/1.3/vhosts/
>
> or here is a google search link that will get you going in the right
> direction...
>
> http://tinyurl.com/mx9b3
>
> Create the directories where ever you want, setup the virtual hosts in
> /etc/httpd/conf/httpd.conf (I put mine right at the bottom, restart
> apache, and you are there, dude.
>
> I think that there is a commented out sample virtual host section at the
> bottom of your httpd.conf file that you can uncomment and then copy and
> paste more sections as you need them, configuring each one accordingly.
> Yeah, here, I did not even uncomment and use the sample, I just left it
> and made my own right under it. Works like a charm!
>
>
> ### Section 3: Virtual Hosts
> #
> # VirtualHost: 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 worry
> about
> # IP addresses. This is indicated by the asterisks in the directives
> below.
> #
> # Please see the documentation at
> # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
> # for further details before you try to setup virtual hosts.
> #
> # You may use the command line option '-S' to verify your virtual host
> # configuration.
>
> #
> # Use name-based virtual hosting.
> #
> #NameVirtualHost *:80
> #
> # NOTE: NameVirtualHost cannot be used without a port specifier
> # (e.g. :80) if mod_ssl is being used, due to the nature of the
> # SSL protocol.
> #
>
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a VirtualHost container.
> # The first VirtualHost section is used for requests without a known
> # server name.
> #
> #<VirtualHost *:80>
> # ServerAdmin webmaster@dummy-host.example.com
> # DocumentRoot /www/docs/dummy-host.example.com
> # ServerName dummy-host.example.com
> # ErrorLog logs/dummy-host.example.com-error_log
> # CustomLog logs/dummy-host.example.com-access_log common
> #</VirtualHost>
>
>
> --
> ~Ohmster


It took me a bit to figure it out, but I got it to work.

It was the 'documentroot' statements that were keeping it from working
properly.

Once I set the document root to the actual home directory, everything
started working as advertised. I currently host 2 sites with a third
on the way in the next day or two.

The other thing I noticed is that I have to create actual directory
structure with names of:

www.somsite.com
subdomain.somesite.com

Otherwise, when someone enters the domain name URL, they still get the
IP Address URL: http://xxx.xxx.xxx.xxx/~userdir/index.html instead of
http://subdomain.somesite.com

Still trying to fix that part of it, as I would rather people see the
domain name URL of subdomain.somesite.com.

SwtDivaLove

2006-08-01, 7:28 pm


SwtDivaLove wrote:
> Ohmster wrote:
>
> It took me a bit to figure it out, but I got it to work.
>
> It was the 'documentroot' statements that were keeping it from working
> properly.
>
> Once I set the document root to the actual home directory, everything
> started working as advertised. I currently host 2 sites with a third
> on the way in the next day or two.
>
> The other thing I noticed is that I have to create actual directory
> structure with names of:
>
> www.somsite.com
> subdomain.somesite.com
>
> Otherwise, when someone enters the domain name URL, they still get the
> IP Address URL: http://xxx.xxx.xxx.xxx/~userdir/index.html instead of
> http://subdomain.somesite.com
>
> Still trying to fix that part of it, as I would rather people see the
> domain name URL of subdomain.somesite.com.


I figured it out. My site software that I was using needed URL
corrections.

joe10001@hotmail.com

2006-08-01, 7:28 pm

hey all,

I finally got it work but I have another problem !

For example when I type my domaine name www.somesite.com I reach the
page I'm suppose to. But once, I'm clicking on any link on this page,
it still work, but instead of seeing www.somesite.com/Page in the
address bar, I see something like this 192.168.1.15/bla/bla/Page (where
bla/bla are the folders from /var/www)

I made some test from a computer outside and the comp tried to reach
192.168.1.15 (private address). And the weirdest is that the page had
load ! I don't understand since 192.168.1.15 is a local address. It
loaded very slowly and not the way it was suppose to

ty for helping, any comment would be very appreciated

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com