Problems updating web page on Linux server

Problems updating web page on Linux server

Post by Stu Pada » Wed, 05 Sep 2001 12:29:58



Fist off. I know nothing about Linux. About all I know is to read and
change directories and start up Xwindows. I friend of a friend asked
me if I could change the passwords to his Linux box, which I did.

BTW: Is there a way to keep the listing from rolling off the top of
the screen when you use ls or ls -l? Something like the /p switch in
DOS?

Here's the problem. Hopefully someone knows the answer or can at least
point me somewhere to look for it.

When he updates his web site he does it on a Mac and then copies the
files over to the Linux server using a CD (no floppy on the Mac!?).
When we tested this we just tried overwriting one file(contacts.html)
and it looks fine when viewed from the Linux box. When viewed over the
internet the old contacts.html still shows up.

We're sure we overwrote the old file and the letter case is correct.
We tried accessing it over the net from different computers and
refreshing the page but no change.

When I ping the website I get a "Request timed out". I thought this
meant the computer isn't there or accessable from the internet. So
where's the website coming from!!! I did shut down and restart the
Linux box just to be sure the web site actually was being served from
there.

The only things I can think of is that the server is behind a
firewall? in which case I'm totally lost! Or the contacts.html file we
overwrote was the wrong one.

I looked through the directories using the Xwindows file manager and
only found the files for the website in one location. The location was
/home/httpd/photoxxxxx/*. photoxxxxx being the domain name for the
website. Is this the only place the web server would look for the
files? Is there some sort of cache on the server?

The guy I'm doing this for says his ex employee used to just copy the
whole directory over to the server when he was updating the website.
Even if he was just updating one file. Could this have something to do
with it? Permissions or something? When I checked the permissions for
the photoxxxxx directory the user was 501 or something like that. Even
though there's no user 501 on the system. That I could find.

He also says the guy did something after he copied the files over but
has no idea what it was. When I first turned on the monitor it said
something or other about apache and I had to hit Ctrl+z to get to the
prompt. Is apache the web server? Or a firewall?

Man! I'm lost! Unfortunately, I don't have access to the computer
unless someone is there. Otherwise I'd keep at it till I figured it
out. Meanwhile, it's driving me crazy not knowing whats wrong. Any
pointers would be greatly appreciated!

 
 
 

Problems updating web page on Linux server

Post by Rob Ristro » Wed, 05 Sep 2001 14:52:31


Stu>
Stu>*off. I know nothing about Linux. About all I know is to read
Stu> and change directories and start up Xwindows. I friend of a
Stu> friend asked me if I could change the passwords to his Linux box,
Stu> which I did.
Stu>
Stu> BTW: Is there a way to keep the listing from rolling off the top
Stu> of the screen when you use ls or ls -l? Something like the /p
Stu> switch in DOS?

You can pipe ls into a pager:

ls -l | less
ls -l | more

Cntrl-c will stop more and get you back to the prompt; for less "q"
will exit it.

You might want to look into using emacs for file browsing.  Cntrl-D
will list a directory, and then you can search with in it, change
permissions, edit files and enter sub-directories with a single
keystroke -- look at the tutorials and help for emacs or send me email
for a short overview.

Stu> Here's the problem. Hopefully someone knows the answer or can at
Stu> least point me somewhere to look for it.
Stu>
Stu> When he updates his web site he does it on a Mac and then copies
Stu> the files over to the Linux server using a CD (no floppy on the
Stu> Mac!?).  When we tested this we just tried overwriting one
Stu> file(contacts.html) and it looks fine when viewed from the Linux
Stu> box. When viewed over the internet the old contacts.html still
Stu> shows up.
Stu>
Stu> We're sure we overwrote the old file and the letter case is
Stu> correct.  We tried accessing it over the net from different
Stu> computers and refreshing the page but no change.
Stu>
Stu> When I ping the website I get a "Request timed out". I thought
Stu> this meant the computer isn't there or accessable from the
Stu> internet. So where's the website coming from!!! I did shut down
Stu> and restart the Linux box just to be sure the web site actually
Stu> was being served from there.

The machine might respond to web requests on port 80 but not pings, it
depends on the firewall and network setup.

Stu> The only things I can think of is that the server is behind a
Stu> firewall? in which case I'm totally lost! Or the contacts.html
Stu> file we overwrote was the wrong one.
Stu>
Stu> I looked through the directories using the Xwindows file manager
Stu> and only found the files for the website in one location. The
Stu> location was /home/httpd/photoxxxxx/*. photoxxxxx being the
Stu> domain name for the website. Is this the only place the web
Stu> server would look for the files? Is there some sort of cache on
Stu> the server?

Here is a command (which may take a while to run) which will find all
files named contacts.html on the machine:

find / -name contacts.html -print

Stu> The guy I'm doing this for says his ex employee used to just copy
Stu> the whole directory over to the server when he was updating the
Stu> website.  Even if he was just updating one file. Could this have
Stu> something to do with it? Permissions or something? When I checked
Stu> the permissions for the photoxxxxx directory the user was 501 or
Stu> something like that. Even though there's no user 501 on the
Stu> system. That I could find.

If you look at /etc/passwd file, you should be able to see if there is
a user with userid 501.

Stu> He also says the guy did something after he copied the files over
Stu> but has no idea what it was. When I first turned on the monitor
Stu> it said something or other about apache and I had to hit Ctrl+z
Stu> to get to the prompt. Is apache the web server? Or a firewall?

Apache is the web server.  Ctrl-z suspends a job, that is, "puts it in
the background" but stops it from running.  Perhaps the command that
was running was "tail -f /var/log/access_log" or a tail -f of some
other log file.  Tail will display the last few lines of a file, and
that -f will cause it to "follow" the file, i.e., display new stuff as
it is added to the file.

Stu> Man! I'm lost! Unfortunately, I don't have access to the computer
Stu> unless someone is there. Otherwise I'd keep at it till I figured
Stu> it out. Meanwhile, it's driving me crazy not knowing whats
Stu> wrong. Any pointers would be greatly appreciated!

Rebooting the computer should have fixed anything funky that you did
by cntrl-x, if that was an important process that was running.  I'm
not sure what the problem is, but here are a few things to do to learn
more info once you can get back to the machine:

1) Confirm that apache is the web server.  Running the command "ps
   aux" should list all processes, you should see some named "httpd".
   You can use the command "chkconfig --list" to see that the httpd
   process is started at boot.  Use the "What's that site running?"
   query on netcraft.com (you can do this without being at the
   machine).  There is probably a script in /etc/rc.d/init.d/httpd
   that starts up the web server.  Look in this file and you can see
   the actual command used to start the web server,

2) Find the apache log and configuration files.  The configuration
   file should be listed at the top of the /etc/rc.d/init.d/httpd
   file, something like this:

# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf

   Look in those files, and you will see the log files for apache
   listed.  There is usually an error log and an access log.  Look at
   those.  They will probably be in /var/log/httpd, but they can be in
   other places.

   A final log file to examine is the general one, /var/log/messages.

Hopefully somewhere in those you should find some clues; if it isn't
obvious what's going on post the new info here.

--Rob

 
 
 

Problems updating web page on Linux server

Post by Dean Thompso » Wed, 05 Sep 2001 19:13:46


Hi!,

Quote:> Here's the problem. Hopefully someone knows the answer or can at least
> point me somewhere to look for it.

> When he updates his web site he does it on a Mac and then copies the
> files over to the Linux server using a CD (no floppy on the Mac!?).
> When we tested this we just tried overwriting one file(contacts.html)
> and it looks fine when viewed from the Linux box. When viewed over the
> internet the old contacts.html still shows up.

It sounds like there is a cache running somewhere.  You will need to make sure
that the cache on the client browser is purged before you go back to the site,
otherwise you might not see the new details on your web browser.

Quote:> When I ping the website I get a "Request timed out". I thought this
> meant the computer isn't there or accessable from the internet. So
> where's the website coming from!!! I did shut down and restart the
> Linux box just to be sure the web site actually was being served from
> there.

If the web site is actually down, then you will always be using the "cached"
copy rather than the "live" copy on the system.  First thing to do is check to
make sure you have connectivity with the WWW server.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

1. Can't access Linux web server web pages from LAN client

I am new  at using Linux and just got Mandrake Linux 9.0 on my machine
and trying setting up a small LAN using the Linux box as my server with
two Mac OS 9 clients and one Window 98 SE client. I only have one of the
Mac's connected to the LAN right now until I learn what the hell I am
diong.

Now for the problem, I setup the DHCP server and got that working and
everthing seems to work fine. Then I got my web sever (Apache 1.3) up
and running. I can access my web pages on the server itself with the
addresses http://localhost/ and http://127.0.0.1/ but can't access them
from my client.
Can somebody please tell me what i'm doing wrong?

2. 1.1.89 - kernel panic (PPP)

3. How can update a portion (text only) of a web page using push server techique?

4. COMPAQ TL891 Tape Library

5. WWW: Updated Linux Web Page

6. firewall "martians"

7. Best way for restricted user web page update with Apache/Linux?

8. Embarrassing Newbie Question

9. I can ping my web server but can't open page in web browser

10. Utility to convert PowerPoint "web pages" into real web pages?

11. Cannot access Linux Web Page or ping linux server from different subnet.

12. question regarding securing web pages on an internal web server

13. Linux Web server vs. Sun web server?