Enable SSI w/ Apache OS X 10.4.7

I'm trying to enable server side includes on two of my computers. I'm running OS X 10.4.7 with the default Apache installation.
I've followed the steps in the Apache Docs, but to no avail. I've tried the following things, and all combinations I can think of:
created a directory called test in both my sites and /library/webserver/documents that contains 2 files, test.shtml and test2.shtml. test2.shtml contains the following:
<html>
<body>
hello <!-- #include file="test2.shtml" -->
</body>
</html>
in the /etc/httpd/httpd.conf file I've added Includes to the options for <Directory />, <Directory /Users/*/Sites> and <Directory "/Library/WebServer/Documents">.
I've uncommented:
AddType text/html .shtml
AddHandler server-parsed .shtml
I've also tried adding a .htaccess file to the directories with
Options +Includes
inside.
None of this has had any effect... even some errors or erratic behavior would be nice right now. When I look at the source through a web browser the <!-- #include file="test2.shtml" --> is still there unchanged.
I've exhausted all the options already talked about in these and many other forums... What am I doing wrong?
Thanks

Looks like Apache was fine - it was my syntax that was off.
Replaced:
<!-- #include file="test.shtml" -->
with:
<!--#include file="test.shtml"-->
and it worked!

Similar Messages

  • Enable PHP and apache!

    Hello,
    Is there a simple way to enable php and apache on my new imac? So I can test my website locally. Hopefully its not a lot of steps. I have seen a lot of tutorials by using google. But they involve terminal and I don't know that well to be able to mess with it. I don't want to ruin my computer. So any help would be appreciated.
    Thanks,
    Kash_Money

    And to answer your first question, "how can I use a .html extension page" see http://discussions.apple.com/thread.jspa?messageID=5850167&#5850167
    which is, however, for Tiger. On Leopard, the relevant file is /etc/apache2/httpd.conf and it turns out that /etc/apache2/other/php5.conf is even more relevant for exactly what you want.
    Specifically, first read the first paragraph therein for why you should do something else instead. However, the hopefully not too crazy instructions (sorry, but the only way I know how uses the Terminal and emacs, so due to your Terminal-phobia I'll give detailed instructions and hope I'm not insulting you too much), will be for what you want, not for what I think you should do. The Terminal+emacs instructions are needed because /etc/ is a hidden directory owned by root, which makes it hard to use TextEdit to edit it.
    So open a Terminal , and type
    sudo emacs /etc/apache2/other
    emacs is a text editor that works inside the Terminal, and which, for the uninitiated, has weird key bindings. You'll probably see something like
    <pre style="background: #eee">
    <IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
    DirectoryIndex index.html index.php
    </IfModule>
    </IfModule>
    </pre>
    Press the down arrow key, ctrl-e, and type " .html". The file contents should now look like
    <pre style="background: #eee">
    <IfModule php5_module>
    AddType application/x-httpd-php .php .html
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
    DirectoryIndex index.html index.php
    </IfModule>
    </IfModule>
    </pre>
    Type ctrl-x ctrl-s to save, and then ctrl-x ctrl-c to exit.
    Restart the web server, either by typing
    sudo apachectl restart
    or by going into System Preferences and unchecking, then checking web sharing.

  • Enabling SSI for users

    I'm trying to enable SSI (Server Side includes) for users. I have it working for the directories in the main sites, but the pages are not being parsed in the user directories. I tried creating a new directory entry in httpd.conf for /homedirs/*/Sites/ but it seems to be ignored. Does anyone have any ideas? This is running on 10.2.8 server.

    You may want to make individual changes to /etc/httpd/users/username.conf files.
    When you say SSI, do you mean the ".shtml" stuff? Did you create an "Includes" option? If you meant CGIs (like C and Perl), then did you add an "ExecCGI" option?
    <Directory "/Users/username/Sites/cgi-bin/">
    Options Includes ExecCGI
    </Directory>
    If it's a CGI, make sure that the executable's file name ends in ".pl" or ".cgi" and they have global execute permissions.
    Also make sure that mod_cgi is being loaded in httpd.conf (look in the list of LoadModule and AddModule).
    Extended Keyboard Server   Mac OS X (10.4.1)  

  • How to enable RewriteLog in Apache on OSX Server 4

    Hi,
    I'm having a hard time trying to enable RewriteLog in OS X Server 4 configuration file. It simply makes the server not responding after configuration files change.
    I want to put these lines:
    RewriteLog "/var/log/apache2/rewrite_log"
    RewriteLogLevel 3
    I tried to put these in different locations like in:
         /Library/Server/Web/Config/apache2/sites/0000_any_80_.conf
    or in
         /Library/Server/Web/Config/apache2/httpd_server_app.conf
    And in the host config but it doesn't work.
    I touched and changed the mode of the file /var/log/apache2/rewrite_log to 777 in case ... still not working
    As soon as I put theses lines the web server seems to be crashed even though it states to be restarted with a green light on the UI.
    'serveradmin status web' reports it to be running.
    Now if I remove the 2 lines and restart the server the server responds again to http requests but I have no debug log of the rewrite rules.
    It looks like the apache config is not well parsed or something. 'serveradmin settings web' does not mention the RewriteLog path.
    So what should I do to have RewriteLog working in OS X Server?
    Thanks for any help.

    Ok so I make this reply to myself for anyone who could encounter the same issue.
    Server 4.0 comes bundled with Apache 2.4.9 and since 2.4 the mod_rewrite logging config is now a bit different, thus, the RewriteLog* statements are not recognized anymore by apache. The correct syntax is for example:
    LogLevel alert rewrite:trace3
    The files to put this on are the ones I mentioned in my post.
    One last side note, it would be very handy to be able to do a syntax check of the apache conf like with 'apachectl -S' on the server. But I've not found how one would do that with serveradmin. If anyone knows I'd be very pleased to know how.

  • Enabling PHP In Apache

    Hi, I just got a macbook, and am trying to setup PHP on it. I have tried following all the tutorials on google where it says to uncomment all the lines regarding PHP, then press wq: or whatever to save and quit, but then every time I make a simple php script, it just echos back the text from the php script. for example when the php script says "<?php echo date(Y); ?>" it just prints "<?php echo date(Y); ?>" when I go to my IP. What am I doing wrong?

    Did you go to Marc Liyanage's site? He has made some great install packages, especially if you are going to use MySQL with PHP.
    http://www.entropy.ch/software/macosx/

  • Enabling PHP is breaking Apache.

    I am following the tutorial at, http://developer.apple.com/mac/articles/internet/phpeasyway.html, to enable apache/mysql. Where the tutorial is titled, "Enabling PHP in Apache", I copy and pasted the code to terminal. Osascript password prompted and I entered. When the script finished, I can't access "my computers website", as it just returns as busy/not found. For some reason the Mac HD: private: etc: apache2: httpd.conf file (the copy) is created, but is completely blank. When I replace it with the original, I can access "my com website" again.
    Also. The httpd.conf file does not have a line "#LoadModule php5_module libexec/apache2/libphp5.so".... so there is nothing to toggle?
    Can I just edit that file manually to enable Php?
    Message was edited by: thejackkelly

    Solved with new php install.

  • Lion server and SSI

    I wanted to have some SSI elements on my site, which I'm hosting off my iMac (I know it's not the best setup, but it works well, considering my site isn't tremendously popular). I tried to test wether it supported SSI by creating an HTML document, then an SHTML document, with this source code:
    <HTML>
    <TITLE>Test File</TITLE>
    <!--#config timefmt="%A" --> <!--#echo var="DATE_LOCAL" -->
    </HTML>
    as advised by HTMLGoodies. The code is supposed to display the day of the week on the page. If it didn't, I was supposed to try it with an SHTML file. Niether worked.
    Is there any way to enable SSI in Lion Server 10.7.1?

    The following is the Apache doc on Server Side Includes: http://httpd.apache.org/docs/1.3/howto/ssi.html
    It describes how Apache (which is what LION server is using) needs to be configured to allow for SSI.
    Instead of configuring Apache to work differently than LION set it up (there can be issues where LION will disregard your settings, overwrite them, etc.), I would recommend creating an .htaccess file in the main folder of your site with the following content:
    Options +Includes
    AddType text/html .shtml
    AddHandler server-parsed .shtml
    That will configure just your site (not the whole server) to allow SSI.
    Good luck!
    ~Mike

  • SSI with uploaded shtml files

    Is it possible to use SSI on files uploaded to the document table.
    I have tried the following:
    1. Enable SSI in httpd.conf (Addhandler, addtype)
    2. Added Options +Include to the directory which contains the files i want to include in plsql.conf.
    It's still isn't working. Anyone got any ideas?
    TIA
    johan

    Sorry to disagree, but I think it won't work. mod_plsql handles the request and retriving of BLOBS (that's the way uploaded pages are stored). I don't think mod_plsq honours directives like Addhandler, since those directives are parsed by Apache core routines and very few handlers (mod_plsql is itself a handler) honour other handlers. The only notorious exception to this rule I know about is mod_perl. Well, in fact mod_perl emulates SSI, wich is not exactlly the same but it has the abillity to be aware of all Apache's config directives.
    So, what can you do?. Well, I think the most aesthetic aproach would be replacing wwdoc_process.process_download procedure. You can write a PL/SQL or JAVA procedure that parses SSI directives and integrates in the Portal 3.0 framework. It's not that difficult. First you must know how to handle BLOBS from PL/SQL of JAVA and then a little bit of regular expression expertise and you can easilly coume out with a solution.
    Once you have your procedure ready you can replace the original one by altering the DAD configuration. If you still keep a beta version of Portal 3.0 you can take a look at the source of WWWDOC_PROCESS package to see an example of process_download procedure.
    I must confess I haven't tested all this myself, but I hope my advice goes in the right direction. I would appreciate if someone could further comment on this issue.

  • How to enable ssl in ohs

    I installed the web tier (ohs and web cache) 11.1.1.2 on 2008 r2 64 bits. Also I patched that to 11.1.1.3 I did not think and this may
    be where I went wrong, I needed to install weblogic?. I have not done anything with webcache. yet.
    I had imagined I could enable ssl in apache the way it is done on other installations just by putting entries in
    the ssl.conf like SSLCertificateFile and SSLCertificateKeyFile . But no. The software will not allow you to do that.
    I believe the certificate has to go in a wallet (for ohs. Other fusion things want a different plan). There's multiple
    wallet programs already there such as from installing the database. I find that the wallet program will not allow
    me to use the csr I already created that was used to get the certificate I have gotten. oops!
    So anyone know if there is a way around this so I can use the .crt and .key I have for this domain name?
    This is really taking a lot of time. I suppose I could install apache, the regular one, on this machine so that I
    could use an ssl connection to that and then hand it over to ohs. Since it wasn't going anywhere it wouldn't
    be much of a problem the traffic wasn't encrypted.
    Edited by: lake on Nov 23, 2010 7:11 PM

    I thought I'd never get this to work. No one should bother trying without reading the docs
    1226484.1 and 1218603.1 on metalink.
    While it could be that one could use a reverse proxy such as using proxypass and proxypass reverse
    in an apache web server so that ssl could be configured in the other server, I saw reports of that not always working.
    Otherwise if one did not install weblogic I believe the only way to configure ssl with this version of ohs is with orapki the command line
    interface for handling wallets, or the gui wallet application which I found on the 11gr2 database menu under "integrated management tools". You may be able to add an existing csr to a wallet via the orapki interface.
    If you were using a separate key and certificate you may be able to change them to the wallet requirements given sufficient knowledge of opensll. That was more knowledge than I had. So what I did
    was start over from scratch totally. I created the csr in the wallet gui, exported it, submitted it, and got a totally new cert from our cert source.
    What I used for the wallet "operations, import user certificate" was a .cer file, and it worked. The wallet already had our CA in it so I did not have to fight that battle. Hallelujah.
    It is essential to check on the "Wallet" menu the "Auto Login" selection before saving it. When you save a wallet
    it will be called cwallet.sso if it is autologin. If the saved file is called ewallet.p12 it is not autologin and will not
    work for ohs.
    After you have saved your wallet as cwallet.sso say in
    "....instances\instance1\config\OHS\ohs1\mykeys"
    then you would need to check the ssl.conf and it would need to be like so:
    SSLWallet "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/mykeys"
    Note that is to the directory the sso file is in.
    But wait there's more....
    on windows 2008 r2, you need to get fire up windows explorer and navigate to your cwallet.sso file
    Under properties, security you need to add SYSTEM in "group or user names" and give it all permissions possible.
    Secondly, you need to go under properties, security, advanced, owner and change the owner to SYSTEM.
    Without these changes it will never work because the web server cannot open the wallet.
    Remember by default the logs go in
    "....instances\instance1\diagnostics\logs\OHS\ohs1"
    I became very familiar with them :-)

  • PHP and Apache, Bah Humbug

    Setting up PHP and Apache, I was following this: http://developer.apple.com/mac/articles/internet/phpeasyway.html
    I did the step to turn on "web sharing", and the "your computers website" link opened up the local page no problem. When I copy and pasted the content in "enabling PHP in apache" to terminal, I thought it worked... but now neither of the links work. Both say something like "Firefox can't establish a connection to the server at....". Any ideas?

    Safari says this:
    Safari can’t connect to the server.
    Safari can’t open the page “http://192.168.1.100/” because Safari can’t connect to the server “192.168.1.100”.
    I tried restarting apache with "sudo /usr/sbin/apachectl restart", but no luck, still get same messages in browsers.
    The computer's site (not personal) DID work when I started following the tutorial, but I only got half way through. I believe it stopped working when I copy/pasted the part from the tutorial. Any ideas? Can I completely reboot the process somehow?

  • Getting error after enabling php in httpd.conf

    Hi,
    I want to get php enable on the Apache web sever that is part of OS 10.6.1. I read the docs and uncommented the Load line for php in httpd.conf. Then I restarted the web server. Now when i try to access via Safari a phpinfo( ); command as part of a simple .php file, I get the following error:
    Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    Fatal error: Unknown: Failed opening required '/Users/mobilemojo/Sites/phpinfo.php' (include_path='.:/usr/lib/php') in Unknown on line 0
    Is there something else that has to be modified to get php module to load?
    Thanks in advance!
    K

    Hi Sridhar,
    Please compare the DTS settings on the Windows 7 computer and the Windows Server 2008 R2 computer and make sure they are identical.  Make sure the “Allow Inbound” and “Allow Outbound” options are check, and pay attention to the authentication mode as
    well.
    Besides, make sure both Distributed Transaction Coordinator (TCP-In) and Distributed Transaction Coordinator (TCP-Out) rules in Firewall are enabled.
    If the issue persists and there are any security/anti-virus software, temporarily disable the security/anti-virus software and check the issue again.
    Regards,
    Mike Yin
    TechNet Community Support

  • Enable SSL cache for inbound requests to dispatcher

    Hi All,
    I have the following problem.
    Usecase: Serve a few pages of the site via SSL.
    I have enabled SSL on apache webserver such that while accessing certain pages, via mod_rewrite requests are made through SSL.
    CQ Publish <---- http ----> Webserver <---- https ----> End user
    Webserver/dispatcher and publish server communicate via "http" only.
    Problem: Since the protected page is initially not present in the cache, accessing it via https returns 404. How should I enable caching of pages accessed via "https"?
    Thanks
    Ashish

    I had missed to include the following section under the virtualhost SSL setup in httpd.conf file.
    <IfModule disp_apache2.c>
                    SetHandler dispatcher-handler
           </IfModule>
    This resolves the issue.

  • Forward Apache environment parameters through mod_jk to servlet

    Hi all,
    Please help me find out solution for next question. I'm totally stuck :(
    Client (rich app) sends HTTP request to web server.
    Request comes to webserver Apache with mod_jk enabled. Another Apache mod adds into environment some specific data, namely CERT_ID.
    In CGI, it is easy to extract its value , like $ENV{CERT_ID}.
    But next, this request forwarding to JAX-WS servlet under Glassfish, ant at this point env attributes disappeared. Parameter CERT_ID seems to be lost :(
    I've tried to explore MessageContext, ServletContext, "java:comp/env", HttpRequest - no signs of required attribute.
    Plese help me find out, which context I must use to fetch this data? Maybe some httpd.conf parameter cat make this able?
    Code shippet will be much appreciated!
    Thanks in advance!

    OK, it seems that mod_jk isn't getting loaded by Apache and I can't figure out why. No error messages or anything?

  • SSI error on iplanet 6.0 for linux and solaris

    Hi,
    I enabled ssi support in magnus and obj according to documentation.
    When I hit shtml file I have this error in the logs:
    parse-html reports: shtml init failed
    Any idea how to fix it?
    Thanks,
    Gaziz

    What webserver version and service pack are you using? I suspect the problem lies with Init settings. Check the Init directives in magnus.conf if its 6.0 and obj.conf if its a 4.1 server. If you still run into issues, can you show us your magnus.conf and obj.conf files.
    Thanks
    Manish

  • Updated to Server 3.1.2 and lost SSI XBitHack

    I had previously enabled SSI and the XBitHack for one of my websites. When I updated to Server 3.1.2, it rewrote the files in (and SSI stopped working):
    /Library/Server/Web/Config/apache2/sites/
    The fix was to re-add (using sudo nano) the line "XBitHack On" in the options section of the 0000_any_80.www.example.com.conf file (within the directory above).

    You can use an include directive in a virtualhost file it does not have to be in the main httpd_server_app.conf file.
    For what its worth I have in the past made other changes both to the main httpd_server_app.conf file and to virtualhost files and they have been kept between restarts. It maybe that Apple are running a check and certain types of changes get cleared, certainly this is the case with bootpd.plist for example.
    Hypothetically, if you are as I believe wanting to use mod_include in order to do SSI then you would enable that module in the httpd_server_app.conf file. I have checked a standard Mavericks and 3.1.2 server and this module is disabled as standard. It is however available and in theory all you need to do is edit httpd_server_app.conf and remove the # to enable that module. Then you should be able to use SSI directives.
    When you upgraded it is likely httpd_server_app.conf got reset back to default and disabled this module.

Maybe you are looking for

  • How to get list of block identifiers in a empty table and an empty index

    We have an application that has issue with ITL waits: this application is running many INSERT statements on a table that has 2 NUMBER columns and one primary key index. The application is designed to run INSERT statements but they are never committed

  • My iPad mini is no longer updating since last iOS update

    My iPad mini is no longer updating through iTunes since the last iOS update.

  • Shuffle works with mac, but not PC

    I bought an ipod shuffle two days ago and I wanted to try it out right away. At the time, I only had my macbook with me, so I put the little music I had on that on my shuffle. It worked fine then. When I was able to get on my PC (that has all my musi

  • JSP + Struts2

    Hello, I'm in a new project that needs to be in JSP. I'm using JSP + Struts2, do you guys think its good? Whats the best and the the most recent technologies to use with JSP? I'm having a problem when passing JSP parameters values to Java Classes in

  • VAT: RFUMSV00 bacth deleted

    Hi, one of my user launched the VAT program RFUMSV00 (S_ALR_87012357) and deleted the batch because new postings were on-going that will change the VAT amounts. After that he tried to relaunch RFUMSV00 but he has only be able to generate a bacth for