LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-23-2008, 01:48 PM   #1
mikescony
LQ Newbie
 
Registered: Oct 2006
Location: Chicago
Distribution: suse 10.0
Posts: 23

Rep: Reputation: 15
Cool Crazy issues with configurng Apache 2.0


Hello again Lords of linux:

I am having problems with configuring apache on my rig.
So far the server is running. I can see site pages through
my browser and other rigs that I have on my home network.

Issue is that I can not use a URL I have to input the server IP
and port number. Or input the url along with the port number.

This machine is going to be used locally (intranet) until I gain
more experience with webpage creation. (Don't wanna embarrass maself!!)

so far I have tried editing listen.conf here is the output:

#
#NameVirtualHost *
<namevirtualhost> 192.168.1.103:8001
Listen 192.168.1.103:8001

Here is the output of vhost:
<virtualhost> 192.168.1.103:8001
/<virtualhost>
<virtualhost> 192.168.1.103
/<virtualhost>
<virtaulhost> *:8001
/<virtualhost>
<virtualhost> *
/<virtualhost>

I have tried making these change manually and through YaST (suse 10.1 tool) Yast has been giving me some crazy A$$ errors also when applying
settings I checked permissions and everything checks out.

I need Guidance from above OH LORDS OF LINUX!!!


Distro I am using is suse 10.1
My rig is a IBM Netvista P4 1.8 ghz

Last edited by mikescony; 01-23-2008 at 01:52 PM.
 
Old 01-23-2008, 02:17 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

I think you've got the syntax wrong (unless there's been major changes between 2.0 and 2.2). The VirtualHost entry should look something like:
Code:
<VirtualHost *:80>
    ServerName www.example.com
    DocumentRoot /var/www/html
</VirtualHost>
Dave
 
Old 01-23-2008, 02:48 PM   #3
mikescony
LQ Newbie
 
Registered: Oct 2006
Location: Chicago
Distribution: suse 10.0
Posts: 23

Original Poster
Rep: Reputation: 15
Hey Iikejam:
Thanks for the quick reply
Now that entry would that be for vhost.conf or listen.conf
I have moved my document root to /home/xxxxxxx/public_html
and that is why I changed the port number to 8001
I don't have to work as root in this folder. (P.S. I am still a newbie!!)
Lastly this is a intranet site (not for outside viewing at this time.)
Do I really need a FQDN??

Last edited by mikescony; 01-23-2008 at 02:54 PM.
 
Old 01-23-2008, 03:03 PM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi again.

It shouldn't really matter (from a technical standpoint) which of the config files you put this in, as long as the file is listed in an 'include' directive from the main httpd.conf . listen.conf is probably a good bet, though.

Could you maybe post the contents of httpd.conf and listen.conf?
Code:
egrep -v '^[[:space:]]*#|^$' /etc/httpd/conf/httpd.conf
will give just the interesting bits - change the file name to suit.

Dave
 
Old 01-23-2008, 04:05 PM   #5
mikescony
LQ Newbie
 
Registered: Oct 2006
Location: Chicago
Distribution: suse 10.0
Posts: 23

Original Poster
Rep: Reputation: 15
Man ilikejam your fast!!!:

Here is the revelant info you requested Httpd.conf:
### Virtual server configuration ############################################
#
# 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.2/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.
#
Include /etc/apache2/vhosts.d/*.conf

Listen.conf:
- on all addresses and ports. This is your best bet when you are on
# dynamically assigned IP addresses:
#
#NameVirtualHost *
xxxxxxxx 192.168.1.103:8001
Listen 192.168.1.103:8001

Ummm... Looks like I found a new resource (DOH!!!!)

Last edited by mikescony; 01-23-2008 at 04:27 PM.
 
Old 01-23-2008, 04:39 PM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hmmm.

Not quite what I was expecting. httpd.conf is usually about 200 lines long without the comments.
I'm not familiar with SuSE's default apache install, so maybe _all_ the config options are buried in /etc/apache2/vhosts.d . If so, this is going to be difficult to debug. We'll have a bash at it anyway.

So, you can reach the server using the IP and the port number, so it's working in general.

Copy listen.conf somewhere, so we can roll-back if necessary.

Lets say you want to access from your browser 'http://webserver:8001' and have apache serve /home/xxxxxxx/public_html in response to that. (Assuming your web server resolves to 'webserver', of course - adjust to taste).
In that case, you want
Code:
Listen *:8001
NameVirtualHost *:8001
<VirtualHost *:8001>
    ServerName webserver
    DocumentRoot /home/xxxxxxx/public_html
</VirtualHost>
in listen.conf

Try that as the only text in listen.conf, restart apache, and see if you can get to http://webserver:8001 in your browser.
 
Old 01-23-2008, 05:00 PM   #7
mikescony
LQ Newbie
 
Registered: Oct 2006
Location: Chicago
Distribution: suse 10.0
Posts: 23

Original Poster
Rep: Reputation: 15
I have that configured already and that works <virtualhost:8001>
I have also checked the resource I stated earlier URL:http://httpd.apache.org/docs-2.2/vhosts
I am still trying different configs still I have'nt been able to get rid of inputting
the port number..

Ya know I have'nt peirced my ears so why are my brains falling out??
 
Old 01-23-2008, 05:11 PM   #8
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Ah, OK. So the virtualhost is working, but it's the port number that you don't want to have to put in the address bar.

You'll have to set up a 301 redirect from '/' to 'http://virtualhost/:8001'
http://httpd.apache.org/docs/2.2/mod....html#redirect

Dave
 
  


Reply

Tags
apache2, general, listen, server, vhost


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crazy fstab and optical drive issues cjae Ubuntu 3 04-26-2007 12:48 PM
Apache/RedHat server went crazy over the weekend ... please help point_break Linux - General 3 08-23-2005 01:59 AM
Crazy display issues Fedora v3 adoti Fedora 8 03-29-2005 07:40 AM
configurng turboprint anwar_lpk Linux - Software 1 11-01-2003 09:02 PM
a crazy idea: apache dns ? antken General 7 07-21-2003 08:07 PM


All times are GMT -5. The time now is 12:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration