Jeff Greene <[EMAIL PROTECTED]> writes:

> I just emerged Apache 1.3 something to play around
> with it. I have DSL and I'm assigned a dynamic IP so
> in order for me to use my computer on a WAN, I use
> dyndns.org. I use the IP, jjj.homelinux.com. My
> problem is, when I'm at school, I can get to my
> computer through a web browser no problem. But when I
> try to go to another directory like
> http://jjj.homelinux.com/tester, it tries to resolve
> to my local IP on my LAN, instead of
> jjj.homelinux.com.
>

Are you using apache as a standalone or VirtualHost server?

The default setup should work like a charm without any configuration
to the files within /etc/apache/*.

What do you have as your computers hostname? Apache will name itself
what you've assigned as your hostname, so if you've give your
hostname an internal IP name (i.e hostname 192.168.0.148), apache
will name itself just that.

You should try the following:
    * rm /etc/hostname
    * echo jjj.homelinux.com >> /etc/hostname
    * hostname jjj.homelinux.com
    * nano -w /etc/hosts
        127.0.0.1       jjj.homelinux.com server a       localhost
        192.168.0.198   server          a       jjj.homelinux.com


The 'server' and 'a' names are optional, but they help out
tremendously while doing local browsing, as you can do 'lynx
a/~louiscandell/' instead of 'lynx localhost/~louiscandell/'

Also, I suggest using Apache's VirtualHost capabilities.

Add the following (replacing your information with mine):

    * nano -w /etc/apache/conf/vhosts/Vhosts.conf

<VirtualHost *>
        ServerAdmin [EMAIL PROTECTED]
        DocumentRoot /home/lcandell/public_html
        ServerName jjj.homelinux.com
        ServerAlias www.ossh.com jjj (optional)
        ErrorLog /usr/local/www/logs/ossh.com-error.log
        CustomLog /usr/local/www/logs/ossh.com-access.log combined
</VirtualHost>


The above with your information will work as expected, and you can
create subdomains and other cool stuff with VirtualHosts
enabled. Make sure any path and directory you specify within the
above section exists, or else apache will refuse to start. 

If you decide to use the above solution, go ahead and unhash (remove
'#') the line:
   * nano -w /etc/apache/conf/apache.conf
   * Include conf/vhosts/Vhosts.conf

If you do this with the default /etc/apache directory (I hope you
made a backup before editing the files :p), then you should be up and
running without a problem.

> I don't have a static IP so I can't put that in my
> /etc/hosts. I tried playing with the ServerName
> directive, but that didn't help. Does anyone know what
> I'm doing wrong?

The apache server needs to be given the name jjj.homelinux.com, it
wont know what to do, if you dont tell apache that the above name is
meant to be used with the apache server. The above steps should
work... they work for me, and I'm on a dynamic IP just like you. The
above solution shouldnt take you more than 5 minutes to
accomplish. Also, you cant access your server by name within your
local environment, so you will have to use 'lynx a' or 'lynx
localhost' instead of 'lynx jjj.homelinux.com'

Hit us back up if you have any more questions.

-- 
Louis C. Candell

--
[EMAIL PROTECTED] mailing list

Reply via email to