LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 04-06-2005, 02:09 AM   #1
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Rep: Reputation: 15
Configuring apache for network


I have a lamp setup. I have some php pages in /var/www/html that I can see locally.

On another machine on the network I can see the server, myserver, and log into it. I then navigate to http://myserver (http://localhost does not work) and get presented with a welcome to advx.org page saying that if I see this page then the apache server is not fully setup.

What do I have to do to make things acessible?

Thanks a lot, Tom.

Last edited by boardtc; 04-06-2005 at 03:41 PM.
 
Old 04-06-2005, 02:24 AM   #2
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
When you surf to the server with the URL http://myserver it shows you the /var/www/html/index.html file on that server.
To see something else, like /var/www/html/myfiles/test.php you have to enter the URL http://myserver/myfiles/test.php

Another possibility is to move myfiles/test.php to the /var/www/html directory and add test.php to DirectoryIndex
in /etc/httpd/conf/commonhttpd.conf

- Peder
 
Old 04-06-2005, 03:35 PM   #3
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
>When you surf to the server with the URL http://myserver it shows
>you the /var/www/html/index.html file on that server.
>To see something else, like /var/www/html/myfiles/test.php you have
>to enter the URL >http://myserver/myfiles/test.php

Thanks. If I have a test.php file and surf to http://myserver/test.php I can see that php file fine. But when I surf to http://myserver should I not see a list if all available options. I have dotProject there which I can open locally but when I try to go to http://myserver/dotproject it refuses connection to 127.0.0.1 (localhost i know).

Anything to do with permissions?

Any other ideas?

Thanks a lot, Tom.

Last edited by boardtc; 04-06-2005 at 03:44 PM.
 
Old 04-06-2005, 09:02 PM   #4
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
localhost will only resolve if your pc knows where to look for it (i.e. 127.0.0.1). Check the file /etc/hosts for an entry with localhost. What happens when you type on the command line:
Code:
ping localhost
I'm not sure about LAMP itself (I never used/set it up before) but have you tried searching google or here for a guide on how to set it up? A quick search of google has thrown up loads of results.
 
Old 04-07-2005, 01:56 AM   #5
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
If, by " list if all available options" you mean "a list of all the files in /var/www/html" then ; no.

When you use a browser and surf to an URL (like http://myserver) Apache looks in the directory defined as
DocumentRoot in /etc/httpd/conf/commonhttpd.conf (usually /var/www/html).
Then it looks for the entry DirectoryIndex in that file to determine which file in /var/www/html to display
(usually index.html, index.htm, index.php or a number of alternatives).

The files and directories must also have the right permissions for apache to be able to display them. The normal rights are 755.

If you get an "unable to connect to 127.0.0.1" when you surf to http://myserver/dotproject it can either be as CragStar suggested;
you need a "127.0.0.1 localhost" entry in /etc/hosts on thet PC or something in the dotproject directory tries to connect to
something on localhost (most likely the mysql process) and it can't.
I suggest you read the installation documentation to dotproject thoroughly and follow the installation steps there.

- Peder
 
Old 04-07-2005, 03:33 PM   #6
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for the tips guys. It's a standard install I am working with, the DocumentRoot is :
<Directory /var/www/html> and the DirectoryIndex :
<IfModule mod_dir.c>
DirectoryIndex index.html index.html.var index.php index.php3 index.shtml index.cgi index.pl index.htm Default.htm default.htm index.xml
</IfModule>

when I do :
ls -l index.shtml
I get :
-rw-r--r-- 1 root root 6295 Sep 16 2003 index.shtml

does that mean 755 ?

I read through the installation instructions for dotproject and it's no help, they say stuff like :
"If you get an error page, or a directory listing, then your web server does not support index.php as a valid directory index. Contact your web server support staff to resolve this"

the other 2 machines on the network are m$ boxes. When I do a ping localhost on them, they ping themselves, that's probably a windows thing. On both windoze boxes I can ping myserver fine.

looking in hosts in etc there is only one line ::
127.0.0.1 localhost
(like I say it's a standard install)

doing a ping 127.0.0.1 takes its time but gives :
-- 127.0.0.1 ping statistics ---
22 packets transmitted, 22 received, 0% packet loss, time 21039ms
rtt min/avg/max/mdev = 0.024/0.026/0.030/0.007 ms
a ping localhost times out...could this be the problem?

Do I need to do anything with samba or something?

further help is _much_ appreciated...working with linux is always feeling in the dark for me.

Cheers, Tom.

Last edited by boardtc; 04-07-2005 at 04:34 PM.
 
Old 04-08-2005, 02:26 AM   #7
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
No -rw-r--r-- is 644. You have three potential groups of rwx (the first - is not counted, that's a d if it's a directory).
r=4, w=2 and x=1 and you add them together. So -r--rwx-w- whoud be 472 and -rwx-r-x-r-x is 755.
But 644 should do for files.

"a ping localhost times out" : That's weird. Check the permissions on your /etc/hosts file. It should be -rw-r--r--
If it's say -rw------- then only root can use it to translate "localhost" into 127.0.0.1 (which is wahat's done when
you ping localhost)

Samba is used for letting windows boxes mount linux filesystems as shares. It has nothing to do with web access.

I downloaded dotproject-2.0 and untarred it in /var/www/html (creating a subdirectory called dotproject)
Then I surfed to 127.0.0.1/dotproject/install (as per the README) and had the possibility to start installing it.

- Peder
 
Old 04-08-2005, 02:03 PM   #8
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
Peder - thank you so much for going to the trouble of downloading dotproject.

hosts has the permissions
-rw-r--r--
as you hoped.

i installed it _from the server_ http://myserver/dotproject/install.index.php
with no problems. Still trying to figure out why it can't be see, whereas i can see http://myserver/test.php

I did a :
ls -l dotproject
and it gave :
-rw-r--r-- 1 christine users 251089 Apr 1 02:49

I am logged on as Tom. I must have installed it when I was logged on Christine's account. Would this be a problem? I tried chown tom dotproject but that did not change the owner when I do ls -lo dotproject.

A ping localhost gives
72 packets transmitted, 72 received, 0% packet loss, time 70991ms
A ping 127.0.0.1 never stops
64 bytes from 127.0.0.1: icmp_seq=328 ttl=64 time=0.027 ms...

So from the m$ box I can do a :
http://myserver/test.php
which shops test.php fine
but
http://myserver/dotproject
says unable to connect to 127.0.0.1

I can run dotproject on the server fine. When I open it's install page which check the prerequisites it sees the mysql connection fine.

I have played with this for hours i'm desperate to get it to work but have run out of ideas what to try and am really hoping for much appreciated help.

Thanks a lot Tom.

Last edited by boardtc; 04-18-2005 at 03:50 PM.
 
Old 04-11-2005, 01:11 AM   #9
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
If you do a 'ls -lad /var/www/html/dotproject' you should have -rwxr-xr-x (755) for it to work.
The acctual ownership of the files is less important, but you can't chown if you're logged in as tom
and christine owns the file. You'll have to bee root for that.
As root try 'chmod o+x -R /var/www/html/dotproject' to set execute permissions on all files.

It's weird that ping localhost and 127.0.0.1 displays differently but at least the pings seem to work
(72 packets transmitted, 72 received).
I think the real problem is that dotproject is trying to connect to the mysql database (on its localhost interface)
and isn't allowed due to mysql rights.

I think you should go to the dotproject forum and try asking around there. After all, they're the experts on dotproject.

- Peder
 
Old 04-15-2005, 02:49 PM   #10
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
No one on the dotProject forums have been able to help. I'm becoming frustrated with linux's impenetrability but still soldering on!

When I try and access mySql on the server with :
http://localhost/mysql//server_databases.php
I initially got :

you have attempted to establish a connection with 127.0.0.1. However the security certificate
presented belongs to "localhost.!sMLVe". It is possible, though unlikely that someone may be
trying to intercept with this web site.

if you suspect the certificate does not belong to "127.0.0.1" please cancel the connection
and notify the site administrator.

this is issued by www.advx.org

Could this be the problem?

Thanks, Tom.

Last edited by boardtc; 04-18-2005 at 03:52 PM.
 
Old 04-15-2005, 06:44 PM   #11
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
So is this asking you to accept a security certificate? Can you not accept it and carry on? Do you get the same problem when you try: http://127.0.0.1/mysql//server_databases.php

It sounds like a domain name issue. Do you have any idea what !sMLVe is?
 
Old 04-15-2005, 07:53 PM   #12
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by CragStar
So is this asking you to accept a security certificate? Can you not accept it and carry on? Do you get the same problem when you try: http://127.0.0.1/mysql//server_databases.php

It sounds like a domain name issue. Do you have any idea what !sMLVe is?
Help!! Thank you. I'm going around in circles here. I've got that certificate message a few times in the week I've been trying to solve this. I've always accepted it an carried on. I've only got the message on the server.

I cannot connect to the mysql url for the server of the 2 clients. _All_ give the message :
The requested URL /mysql//server_databases.php was not found on this server.
Apache-AdvancedExtranetServer/2.0.47 (Mandrake Linux/6mdk) mod_perl/1.99_09 Perl/v5.8.1 mod_ssl/2.0.47 OpenSSL/0.9.7b PHP/4.3.2 Server at 127.0.0.1 Port 80

Sorry the above should have read localhost.1sMLVe. I have zero clue what this is.

I can ping the server from the clients. But a ping localhost on the clients pings themselves and on the server timeouts (hostname is localhost). I can't ping the clients fom the server, icmp_seq just keeps imcreasing....

Just thinking, before I knew apache was installed with the distribution I downloaded http://www.apachefriends.org/en/xampp-linux.html and 'installed' this but there was a message saying there was already a web server. Not sure where tat was untarred. But the help for it says all you have to do to uninstall is delete the folder so I was thinking it's probably not doing anything if it's there....

If you have other ideas that would be great, ta, tom.

Last edited by boardtc; 04-16-2005 at 03:52 AM.
 
Old 04-15-2005, 08:08 PM   #13
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
A ping to localhost is always going to ping the machine you run the command from.

It sounds like you need to setup a hostname for the server. It doesn't sound like they have been setup correctly in the first place. You may be better off for the time being using the server's IP address instead of a hostname. If you try and use the URL http://localhost/mysql/server_databases.php from the client to access the server it will never work as it is always trying to look on it's own machine.

BTW - if your clients are running web servers you may want to turn them off if they are not being used.

Use the server's IP address (not the 127.0.0.1 one though!!!) from a client. Do you know what the server's IP address is?
 
Old 04-16-2005, 04:20 AM   #14
boardtc
Member
 
Registered: Feb 2004
Location: London, England
Distribution: MDK 9.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by CragStar
A ping to localhost is always going to ping the machine you run the command from.
Good info, thanks mate.
Quote:
It sounds like you need to setup a hostname for the server. It doesn't sound like they have been setup correctly in the first place. You may be better off for the time being using the server's IP address instead of a hostname. If you try and use the URL http://localhost/mysql/server_databases.php from the client to access the server it will never work as it is always trying to look on it's own machine.
hostname from the konsole gives localhost. does that mean a hostname is setup? I have no problem using the ip adresses, sorry should have specified I tried them. When I was talking about pinging i was using the ip addresses.
Quote:

BTW - if your clients are running web servers you may want to turn them off if they are not being used.
neither of the xp (1 pro and 1 home) clients have web servers running....i don't think it's a windows default and i haven't installed iis or anything.
Quote:
Use the server's IP address (not the 127.0.0.1 one though!!!) from a client. Do you know what the server's IP address is?
From the clients going to http://192.168.123.167/mysql/server_databases.php gives the same message :-(

I'm sure it's something simple...it's a standard mdk 9.2 install...i hardly need to upgrade apache or something do i?

thanks for taking the time man.

Last edited by boardtc; 04-21-2005 at 05:11 PM.
 
Old 04-16-2005, 10:30 AM   #15
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
Sorry, I thought that the two clients were Linux machines.

You shouldn't have to upgrade apache. From reading the previous posts it sounds like you are having problems with aligning the pages you want to serve and apache's config.

If your clients are coming back with the message that the URL cannot be found it means 1 of 2 things:

1). That the page does not exist. Check that the page URL is correct and that the page's location on the server is within the DocumentRoot and under the correct path.

2). That the page exists in the correct location, but apache cannot server that page due to permissions or some other reason. Check the permissions, and check the user under which the file is being served. If it's a script you will need execute permissions set for all.

HTH
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring apache NeoAndersn007 Debian 7 03-27-2005 05:31 PM
Configuring Apache desarrolladores Linux - Software 4 06-29-2004 01:14 PM
Configuring Apache Iain Wilson Linux - Newbie 1 09-11-2003 08:16 AM
Need a little help configuring apache... tarballed Linux - Software 1 08-30-2003 01:53 PM
configuring apache d_lake Linux - General 16 05-12-2003 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration