DeveloperSide.NET Forums
November 22, 2019, 12:32:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Newbie with dumb question  (Read 14134 times)
0 Members and 1 Guest are viewing this topic.
markrb
Member
*
Posts: 7


View Profile Email
« on: July 14, 2007, 04:22:18 AM »

OK, I'm new to all this Apache stuff, but I really liked how the whole package set up and got installed.  As far as I can tell, all of the basic stuff installed properly.  I can run the web developer controller, and it tells me that Apache2 is running.
What I want to do is enable Server Side Includes, and work out some kinks in some new pages for the website that I have been working on for a while.  I read the tutorial, followed directions, I have the mod_include added to the modules list, and I have added the following text to my httpd.conf file:

SetOutputFilter INCLUDES

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

In the webroot directory section, I have also added:

Options +Includes

I have put a basic index.html file in my webroot directory, and a small assortment of sample pages that are linked to it.  But nothing gets included, and it would appear that just having Apache running is not the only requirement to use Firefox to browse the pages.  From checking the access.log file, it shows a GET record when I get a help page from the help documentation at http://localhost, but it never shows anything when I browse one of my pages.
What else am I missing?  I don't seem to be "serving" myself my own webpages.  I am sure it is some completely obvious thing that I have no clue about whatsoever.
I would be very grateful for any help, or tips.
From having browsed this forum while waiting for my activation email, this seems to be a great, friendly, helpful place.  I will sure need some help to get started, but I hope that I can get to where I can give back for what I got.

Thanks all...

Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: July 14, 2007, 11:46:42 AM »

You don't need that "SetOutputFilter..." as AddOutputFilter takes care of it.

Go over this... http://httpd.apache.org/docs/2.2/howto/ssi.html

Check \www\Apache22\logs\error.log to see if Apache has logged any errors.

And just do something real simple at 1st to make sure it works, like echoing out the PATH under index.html

Just use this as your index.html file...
<!--#echo var="PATH" -->

And make sure you restart Apache after any config changes.
« Last Edit: July 14, 2007, 11:48:14 AM by admin » Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
markrb
Member
*
Posts: 7


View Profile Email
« Reply #2 on: July 14, 2007, 07:18:53 PM »

As everyone here seems to say, "Thanks for the quick reply!"  Man, you are on it with this stuff!
OK, I have been through that tutorial about 3 times before I posted the first question, and looked at it again.  I had put in a

<!--#printenv -->

before, just to check that, but nothing appears on the page.  I added your suggestion of

<!--#echo var="PATH" -->

and still nothing.
Am I correct in assuming that I just put the pages in the "c:/www/webroot" directory, and then whatever browser I use will get the documents there "served" just by opening them with my browser?
I have started and stopped the Apache2 service every time I have made a change to either a web document, or a config file.  And just to be double sure, after I start Apache back up, I have the controller requery all files again.
I know I am leaving something very simple out, but as a newbie, I sure don't know what it is.
Thanks again, I look forward to getting this all together, and having it work.  You guys have put together an excellent framework of tools.

Mark
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: July 14, 2007, 07:36:07 PM »

I'm missed that one myself: if you are putting SSI into index.html, rename it to index.shtml as that is the extension we are telling apache to parse for SSI.

Quote
Am I correct in assuming that I just put the pages in the "c:/www/webroot" directory, and then whatever browser I use will get the documents there "served" just by opening them with my browser?

No. If you look under httpd.conf, you will see 'DirectoryIndex index.html index.php index.aspx'. That is the list of files apache will look for, if no file is specified.

You can either add index.shtml to the list, or access it as http://localhost/index.shtml
« Last Edit: July 14, 2007, 07:38:02 PM by admin » Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
markrb
Member
*
Posts: 7


View Profile Email
« Reply #4 on: July 14, 2007, 10:05:07 PM »

OK, sorry, I dropped a detail there. 
My index.html does not have any SSI in it.  In my "live" site, and in my test case, index.html has links to it for other pages that all do have SSI in them.  Those are the pages I am trying to get to work.  Index.html comes up fine, because all the header stuff, and trailer stuff that I put into a template for the other pages is included.  But it does not appear that even my index.html is "served" by the Apache2 server, because I don't see any event for it in the log files.  None of the other files show up there either.  All the sub pages ARE named .shtml, and work fine on the live site.  I just can't reproduce "serving" here locally.
And I have checked the error logs, and nothing comes up there either.
Am I supposed to install some other part of the tools that are included with the package?
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: July 14, 2007, 10:47:05 PM »

So when you access http://localhost/index.html you do not see anything under \www\Apache22\logs\access.log?

Have you modified httpd.conf or any other config file?

Where did you place the above AddOutputFilter... code in the file?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
markrb
Member
*
Posts: 7


View Profile Email
« Reply #6 on: July 15, 2007, 12:18:05 AM »

Yes, that is correct.  I see nothing in the access log.  When I open a help page for instance, I DO see an entry in the log, which was one of the first things that clued me in that something was wrong.
I have modified the httpd.conf file by opening it with the configuration --> Apache --> httpd.conf selection in the Web Developer Controller.
I uncommented the Load Module ... include.so, and when I stopped and restarted the Apache service, I then saw the include module in the list.
I added:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Just below the

DefaultType text/plain

statement below the list of modules that can or are loaded.
I then made the following change to the directory definition for the webroot directory:

<Directory "/www/webroot">
    Options +Includes +Indexes +FollowSymLinks

All other settings are the same.  Every time I tried a change like this (I played around a lot before I cried for help), I would stop the Apache service, and restart it, and sometimes just for good measure, I would also have to controller requery all files.
Still nothing.  I haven't changed any other files in any other directories.
I am not using the Dynamic Side net (should I?), and I have not made any changes there.

Thanks very much for hanging in there with me, and following along with this.  I really appreciate your help.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #7 on: July 15, 2007, 12:29:50 AM »

But you do see the html output of http://localhost/index.html in your browser?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
markrb
Member
*
Posts: 7


View Profile Email
« Reply #8 on: July 15, 2007, 01:18:54 AM »

Yes, I do.
If I type that into my browser address bar, I get the index page.  If I click on a link, I see the address of the page in the address bar (ie.: http://localhost/john.shtml), but I get a blank display in the browser.
If I use a windows explorer window to navigate to the webroot directory, and double click on the index file, the address is different. It comes up as this:

file:///C:/www/webroot/index.html

I can click on links from there, and get text displayed of the correct pages, but no SSI.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #9 on: July 15, 2007, 03:57:54 AM »

Are you running any anti-vir or firewall programs? Which version of Windows are you running?
« Last Edit: July 15, 2007, 04:03:08 AM by admin » Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #10 on: July 15, 2007, 04:02:41 AM »

Try this instead...
<Location />
        Options +Includes
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
</Location>
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
markrb
Member
*
Posts: 7


View Profile Email
« Reply #11 on: July 15, 2007, 04:15:56 AM »

I'm running Avast anti virus, and no firewall stuff, because I am behind a hardware firewall.  From the tests I've run, I seem to be pretty invisible from the outside world.  I am running winXP Pro on a Lenovo laptop, dual-core.
Am I making an incorrect assumption that I should be able to "serve myself" webpages, with includes, and anything else, right here locally on the laptop?  From what I've read here in the forums, that's what people want to do, before they go "live".  Well, I've hosed up my live site pretty badly while "testing" new page code.  So I was hoping I could set up a local server, and see stuff before I put it out in front of the public.
I will try the location snippet that you provided in your last post.  Thanks for hanging in there with me all day long :)
I really appreciate the help.

Mark
Logged
markrb
Member
*
Posts: 7


View Profile Email
« Reply #12 on: July 15, 2007, 04:20:58 AM »

Bingo!!!

The <Location /> fixed it.  I added that, commented out the other redundant references to the same things, stopped, started, and viola!  Now it works!

You're my hero :)

Now I can really start to make trouble for myself! :)

I will keep you posted.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!