Click to See Complete Forum and Search --> : How do I find my IP address?


bsh152s
05-06-2003, 10:48 PM
I'm trying to set up Apache and I assume I'll need my IP address.

myshkin
05-06-2003, 10:53 PM
su root
ifconfig ?

Suramya
05-06-2003, 11:18 PM
You can also run /sbin/ifconfig as any user. This is cause /sbin is not in the path for a regular user so you have to give the whole path.

- Sur

dysharmonic
05-06-2003, 11:21 PM
Hi

Are you setting it up on the same machine you're using or another machine? Are you connected to the internet?

Well, in most cases, you could first assign your machine an IP address or get one (a fix IP) from your ISP.

To test your installation of Apache, just use the loopback address, 127.0.0.1 or anything so long as it starts w/ 127.x.x.x.

:)

bsh152s
05-07-2003, 08:37 AM
I only have one PC and it is connected through DSL. I just have the standard Yahoo DSL package so no static IP. A couple more questions:

Where on my disk do I put my web site?
Do I have to do anything special for user sites (~myuser)?
How do I reference my site in a browser? http://x.x.x.x where x.x.x.x is my IP address?

By the way, I am running Red Hat 9.0. I'm not sure what version of Apache (I'm not at my machine), but it's whatever comes with RH9. I 'vseen a lot of places just have you edit some files, but is there a way to do it through the http config tool? Or, is the file editing just as fast and easy?

Thanks for all of the info. I will try /sbin/ifconfig when I get home.

parth
05-07-2003, 05:53 PM
Depends on how you want to do it.If you want each user have there own home or celtral webroot directory.

central webroot directory in /var/www/html

user directory /home/user/public_html

By default it will point to centrl webroot that is /var/www/html

hope this helps

parth
05-07-2003, 05:57 PM
How do I reference my site in a browser? http://x.x.x.x where x.x.x.x is my IP address?

from your mahine you can do

http://localhost .This will give you apache index page.Apache index page in /var/www/index.ht--

If you have your firewall open you can do it byr ip address

http://ipaddress

hope this helps

ShieldWolf
05-07-2003, 06:26 PM
Try browsing to http://www.whatismyipaddress.com.

No kidding. :cool:

bsh152s
05-08-2003, 10:43 PM
Ok, Apache is up and running. When I issued the "httpd -k restart" command, it said that it wasn't currently running. How do I get it to start on boot?

Second question, I can successfully retrieve pages from /var/www/html via http://localhost or http://x.x.x.x. But, I would now like to configure it so all users can put their pages in public_html directories. How do I do this? I have tried to retrieve pages from my user public_html directory via http://localhost/~user, but no luck. Do I have to set up virtual hosts for every user? I'm clueless. By the way, I am trying to use the Apache configuration tool.

serz
05-08-2003, 10:50 PM
Since your're using Redhat. You could just run redhat-config-services, select Apache there and save changes.

So next time your machine boots it will start Apache.

As for the users and apache, you have to read some info about Virtual Hosts in Apache. Make a search in this forum, you will find a answer.

bwkaz
05-08-2003, 11:15 PM
No, you don't need virtual hosts for this. In fact, virtual hosts specifically won't work -- the host part is the "localhost" part only, the /~user isn't even looked at in the vhost configuration.

You need to enable user directories. I think it's something like a "UserDir" option in the httpd.conf file, or something.