MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
>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).
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.
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.
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.
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.
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...
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.
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.
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.
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?
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.
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?
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.