Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Trouble enabling server side includes on home NAS |
|
Author |
|
geefreck
Joined: 03 Dec 2017 Posts: 3 Location: USA
|
Posted: Sun 03 Dec '17 9:01 Post subject: Trouble enabling server side includes on home NAS |
|
|
Hi, new here. I've had no luck so far enabling server side includes on a home NAS, running apache. I'm running a QNAP TS-231+ and have web server enabled. I can view my sites fine with http://192.168.x.x/[site_folder]/index.shtml
I am trying to enable server side includes on my home server. Just FYI, it's not meant to be serving sites on the web, just on my home network, to test my sites before I upload them to the real host.
The SSI works just fine on the actual host site, so that (probably) rules out the code on my pages being the problem.
Here's the real down to earth stuff. I've followed:
[url]httpd.apache.org/docs/current/howto/ssi.html[/url]
as closely as I can tell.
My page shows up with just "<!--#include virtual="menu.txt"-->" embedded in the page. So SSI appears to be off.
Before you crucify me for doing something wrong, please keep in mind I'm not a code junkie, and don't have any real experience here
Here's the relevant sections of my NAS's httpd.conf:
Code: | <IfModule mime_module>
...
...
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#CHANGED BY DAN, TOOK OFF HASHTAGS
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule> |
Code: | # EDIT BY DAN, ADDED INCLUDES, ALLOWOVERRIDE OPTIONS
<Directory />
Options FollowSymLinks Includes
Options +Includes
AllowOverride Options
Order deny,allow
Deny from all
</Directory> |
Code: | <Directory "/root/daily_build/4.2.1/Model/TS-X41/../../NasMgmt/HTTP/apache_install_tmp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
# EDIT BY DAN, ADDED INCLUDES
Options Indexes FollowSymLinks +Includes
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride Options
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory> |
Let me know if you need me to attach the entire file.
Anyone who can help me get this enabled would be very appreciated! |
|
Back to top |
|
pbhq
Joined: 17 Mar 2013 Posts: 37 Location: Germany
|
Posted: Sun 03 Dec '17 18:13 Post subject: Re: Trouble enabling server side includes on home NAS |
|
|
"mod_include" is enabled/loaded in your configuration? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 04 Dec '17 16:02 Post subject: |
|
|
Also mod_mime since there is a ifModule mime_module ... |
|
Back to top |
|
geefreck
Joined: 03 Dec 2017 Posts: 3 Location: USA
|
Posted: Fri 29 Dec '17 3:44 Post subject: |
|
|
Thanks for the advice, that probably is it. Sorry it took so long to reply. It doesn't look like it "mod_include" was loaded, so I took the # off of:
LoadModule include_module modules/mod_include.so
Now I've just reset everything to start over, and make sure I do everything right, and then it should be all done. Two questions:
1. There are multiple sections in the http.conf file with 'options'. How do I know which of these is the right place to edit? Same goes for 'AddType text/html .shtml' and
'AddOutputFilter INCLUDES .shtml'
I'd like it to be enabled for all sites I run off this server, not just one directory. It's merely a home web server, and adding stuff like this has no real impact on anything.
2. Probably stupid question - but I see tutorials saying to put options +includes, does it need the '+' (plus) in front?
Really appreciate the help. |
|
Back to top |
|
geefreck
Joined: 03 Dec 2017 Posts: 3 Location: USA
|
|
Back to top |
|
|
|
|
|
|