Thursday, March 23, 2017

Re: [LINUX_Newbies] Correct file path in a browser

 

On Wed, Mar 22, 2017 at 11:35:21PM -0700, Stan Gorodenski stanlep@commspeed.net [LINUX_Newbies] wrote:

> Apache2 is working because when I enter http://www.192.168.11.4 in
> SeaMonkey or Firefox (from my Windows 7 laptop) I get a message that
> says "It Works" followed by more information, one of which says that if
> I got this message that means Apache2 is operating correctly.

So far, so good.

>
> I downloaded WinSCP to my Windows 7 laptop and was able to copy a file
> to the var/www directory in Ubuntu. Since I was able to make contact
> with my Linux machine (technically, is it correct to say I am making
> contact with Apache2?)

No. Apache listens on port 80 by default, SSH listens on port 22.
From the command prompt, you can do telnet 192.168.11.4 80 and see if you
get a response.

You should get something like

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
(Then if you hit the control key and the right bracket key--the ^ means the
ctl key in this case--you get something like telnet > and can type quit to
get out of it.)

I should be able to read this file with my
> laptop. I tried various combinations of things which I won't go into
> detail here, but it seems the correct file path in SeaMonkey (or
> FireFox) should be
> http://192.168.11.4/[my username]/var/www/CometFront.jpg
> It did not work, even when I left out my user name. Is this the correct
> file path?

If you put the file in the default place, which varies between
distributions, you probably shouldn't need the username.

You can look at httpd.conf and search for DocumentRoot in the file, which
will tell you where Apache expects to find things.

>
> Also, I may have a problem with the installation. I turned the machine
> off and then later turned it on again to make sure I had entered
> everything correctly. Now, my web browser cannot even find
> http://www.192.168.11.4 and when I launched WinSCP it could not make a
> connection and it said the host does not exist. I think what happened is
> that when I changed all the settings to get to the point of being able
> to write a file to var/www, I had made an incorrect change and it did
> not show up until I rebooted the machine. Is this what happened?

It's quite possible. Is the 192.168.11.4 a static address? Could it be a
firewall? Does Apache run on start up? (On most modern systems this is
done with systemd.)

--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

__._,_.___

Posted by: Scott <scottro@nyc.rr.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.

.

__,_._,___

No comments:

Post a Comment