Friday, March 24, 2017

Re: [LINUX_Newbies] Correct file path in a browser

 

Scott,
My problem may be as simple as myself not adding the HTTP line
correctly. As I said below, I am using some old instructions someone had
put on the internet. It said to put
HTTP/ACCEPT net $FW
in the 'rules' which is located in the etc/shorewall subdirectory. I
could not find this subdirectory and, therefore could not find a 'rules'
file, but I found a 'rules' file at
usr/share/doc/shorewall/examples/Universal
and that is where I put the HTTP(ACCEPT) net $FW

I just now looked again in the etc directory and there is a shorewall
subdirectory. For some odd reason I could not see it when I was setting
this up. I edited the 'rules' and added the following two lines
HTTP/ACCEPT net $FW
SSH/ACCEPT net $FW
With this addition I still could not bring up the CometFront.jpg file in
my web browser.**
The 'net' and '$FW' seemed to be reversed from what they should be and
so I reversed the positions and it still did not work. I also got rid of
the '/ACCEPT' and used "(ACCEPT)" instead. It still did not work.

I apologize for all these verbose messages. I think the problem may be
with setting up these two lines in the 'rules' in the etc/shorewall
subdirectory.
Stan
** However, it did something because when I rebooted ubuntu it stalled
for a few minutes with a message that said "A start job is running for
udev Wait for complete device initialization (the time lapsed was in
these parentheses)"

On 3/23/2017 10:29 PM, Stan Gorodenski stanlep@commspeed.net
[LINUX_Newbies] wrote:
>
> Scott,
> I gave the line command
> 192.168.11.4 80
> and got the expected message that said "Connected to Local Host".
>
> The following is with respect to not being able to bring up the
> CometFront.jpg image (that I copied to the var/www subdirectory using
> WinSCP) in my web browser (Seamonkey and Firefox). You said "You can
> look at httpd.conf and search for DocumentRoot in the file, which
> will tell you where Apache expects to find things." There is no
> httpd.conf file in the etc/apache2 subdirectory and so I used nano to
> add a line to apache2.conf that said:
> DocumentRoot "/var/www"
> but it had no effect.
>
> I edited the Shorewall "rules" in the directory
> usr/share/doc/shorewall/examples/Universal.
> I added a line that said
> HTTP(ACCEPT) net $FS 80 80
> I tabbed over so the 80's were under the correct columns. This also had
> no effect. Before I added the two 80's I tried entering a line before
> the HTTP line that said
> accept net 80
> but this had no effect and so I deleted that line and added the two 80's
> to the HTTP line.
> I also tried adding the following two lines:
> ACCEPT 80
> HTTP(ACCEPT)
> to "rules" in the etc/shorewall subdirectory but that did not work either.
> In looking at the various files with nano, I noticed in the "shorewall"
> file in the etc/default subdirectory that maybe I need to add a
> "wait-interface" line. Do I?
>
> I think Apache does start up when I boot up the machine. I think this
> because I made a change to the ServerRoot line in the apache2.conf file
> from "/etc/apache2" to "/var/www". After I made this change when I
> booted up the machine and it was in the process of loading everything I
> noticed one line (I noticed it because the word indicating a failure to
> load was in red) that said Apache failed to load. I reverted back to
> "etc/apache2".
>
> I discovered why my laptop yesterday failed to connect to the server. It
> is because I made a change in the Shorewall "rules" that apparently was
> not correct. I am using a very old description from the internet on how
> to configure everything in ubuntu. This guide said to go into the
> "shorewall" file in the etc/default subdirectory and change "startup=0"
> to "startup=1". When I changed it back to "startup=0" then everything
> worked as it had been. In other words, when I entered 192.168.11.4 in my
> web browser (Firefox and SeaMonkey) I got a message back that said "It
> Works" and WinSPC was able to make contact with the server. However, I
> still cannot bring up the CometFront.jpg image stored in var/www with my
> web browser.
>
> To answer your question "Is the 192.168.11.4 a static address?"
> This is the IP I get when I enter the Ubuntu command "ifconfig | grep
> inet". It does not change when I reboot the machine, although the first
> time I entered this command, days ago, I got 192.168.11.3. It changed to
> 11.4 from 11.3 and has stayed at 11.4 since then. I did get a static IP
> address from my internet provider, but have not yet gotten to the point
> of using it to make the server accessible to the public.
> Stan
>
> On 3/23/2017 3:11 AM, Scott scottro@nyc.rr.com [LINUX_Newbies] wrote:
> >
> > 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: Stan Gorodenski <stanlep@commspeed.net>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

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