Sponsored Content
Top Forums UNIX for Dummies Questions & Answers SSI related Unix In (link) support needed Post 302542888 by johnzule on Friday 29th of July 2011 03:51:58 AM
Old 07-29-2011
SSI related Unix In (link) support needed

I have multiple web sites and have SSI all working fine! but I want a script that allows me to place a SSI script (or .html) on any web site within my server - One problem, SSI is limited to files located within the file structure - I want to access a file outside, (but still on my server) I found this.

-----------------------------------------------------------------
Including Files Outside Your Document Directory
For security reasons, many servers are configured not to allow you to copy in files located outside your webspace, or DocumentRoot. You can either copy the file to your document directory, or do this little trick:

The unix ln (link) command allows you to create a entry in a directory that points to a real file located elsewhere on the computer. If you have a file called myfile.txt located in /usr/me/mybookfiles/source you could do this:

cd public_html (or wherever your webpage is located)
ln -s /usr/me/mybookfiles/source/myfile.txt myfile.txt

You will now have a directory entry in the document directory and your include should work just fine!
------------------------------------------------------------------------

I think that's exactly what I want to do but am not sure how to write the script/syntax ------ I am used to writing in this format

<!--#include virtual="/somedir/file.txt" -->

BUT since this is a unix script there doesn't look like there are any brackets <> so maybe I don't need no brackets for unix (yes newbie hereSmilie --- if I don't need brackets then this would be where the file is located:

cd public_html/thefileIwant.html (do I place this in the head or body or .... of my html page?)

ln -s /usr/me/mybookfiles/source/myfile.txt myfile.txt
means what? how do I interpret this line.........
In (is the command that tells unix to let me in)
-s /usr/me/mybookfiles/source/therfileIwant.html (if the first line points to the file that I want - then what does this script do and what do I write?)

-
do I need to alter the .htaccess file? or it has nothing to do with it because it's a unix command and not SSI Smilie

so I need help to write these 2 lines because I want to call in a file to appear on any of my domains within my server.

Thanks
JohnSmilie

---------- Post updated at 05:51 PM ---------- Previous update was at 03:22 PM ----------

Well, I can't complain about 52 people having a look, but no response? maybe I need to make it clearer.

I think I have found the script to make me happy, just don't know what to do to implement.

I need to customize this:

cd public_html (or wherever your webpage is located)
ln -s /usr/me/mybookfiles/source/myfile.txt myfile.txt

my guess for the first line:
cd public_html/myfile.html

I don't have a guess for the second line:
ln -s /usr/me/mybookfiles/source/myfile.txt myfile.txt

The file I have sits inside my public_html folder and works with the root domain - I am using SSI and it all works fine! BUT now I just want to be able to call this file to other web sites on the same server, (and SSI cannot do this since it calls a file from within the folder structure not outside) and I want to use a common menu, which is found outside the domain folders and in the root for example, public_html/myfile.html.

Looking forward to getting some help.

Thanks.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Support Needed: Education On Hold

I'm Presently Writting A College Report On Operating Systems, Not Enjoying It Very Much. I Was Hoping Someone Could Direct Me To A Site Where I Could Get Information Such As The Role Of Operating Systems, Types Of Operating Systems (Multi-User Multi-Tasking etc), Modes Of Operating systems... (3 Replies)
Discussion started by: OSNovice
3 Replies

2. UNIX for Dummies Questions & Answers

the unix answer to SSI?

On websites I build one thing I like to use is SSI to make it easier for the owner of the site to update parts of it him/herself. So the text of a page is keep in a simple .txt file, which the main page calls. Unix does not support this (I'm told), is there a similar system I can use with UNIX?... (1 Reply)
Discussion started by: garrettcarr
1 Replies

3. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies

4. Shell Programming and Scripting

needed very good link for Shell script

I am new to shell script.I need a link which explains basic concepts for shell scrpting (1 Reply)
Discussion started by: rajareddy_24
1 Replies

5. UNIX for Dummies Questions & Answers

scanner does not support UFS? Help needed!

Hello, I hope somebody can help me. I have a new scanner, that says this: "EPSON Scan does not support the UNIX File System (UFS) for Mac OS X. You must install EPSON Scan on a disk or in a partition that does not use UFS." I have UFS.. is there anything I can do? How do I create/find such a... (0 Replies)
Discussion started by: Hannako
0 Replies

6. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

7. Shell Programming and Scripting

Idea needed regarding process related script

I want to write a script which will take two time as input parameters and display the details of running processes between the two times, any ideas about the script ? (6 Replies)
Discussion started by: sandip250382
6 Replies

8. Shell Programming and Scripting

Question related to bash. Your help needed.

Dear Team, i have one question related to automation of adding new users based on txt file. Here we go: I have data.txt file which shows: bang dang benc One by one, after pressing enter. And now, I need scirpt which will add those users with home directory hidden within the file... (7 Replies)
Discussion started by: protos27
7 Replies
lamssi_cr(7)                                                    LAM SSI CR OVERVIEW                                                   lamssi_cr(7)

NAME
lamssi_checkpoint_restart - overview of LAM's MPI checkpoint / restart SSI modules DESCRIPTION
The "kind" for checkpoint / restart SSI modules is "cr". Specifically, the string "cr" (without the quotes) is the prefix that should be used with the mpirun command line with the -ssi switch. For example: mpirun -ssi cr blcr C my_mpi_program LAM/MPI can involuntarily checkpoint and restart parallel MPI jobs. Doing so requires that LAM/MPI was compiled with thread support and that back-end checkpointing systems are available at run-time. MPI jobs will have to run with at least MPI_THREAD_SERIALIZED support. If a job elects to run with checkpoint/restart support and an available cr module is found, the job's thread level will automatically be pro- moted to MPI_THREAD_SERIALIZED. See the User's Guide for more details. Checkpoint Phases LAM defines three phases for checkpoint / restart support in each MPI process: Checkpoint. When the checkpoint request arrives, before the actual checkpoint occurs. Continue. After a checkpoint has successfully completed, in the same process as the checkpoint was invoked in. Restart After a checkpoint has successfully completed, in a new / restarted process. The Continue and Restart phases are identical except for the process in which they are invoked -- the Continue phase is invoked in the same process as the Checkpoint phase was invoked. The Restart phase is only invoked in newly restarted processes. AVAILABLE MODULES
LAM currently has two cr modules: blcr and self. In order for an MPI job to be able to be checkpointed and restarted, all of its MPI SSI modules must support checkpoint/restart. Currently, this means using the crtcp RPI module or the gm RPI module when compiled with gm_get() support (see the User's Guide for more details). blcr CR Module The Berkeley Lab Checkpoint/Restart (BLCR) single-node checkpointer is a software system from Lawrence Berkeley Labs. See the project web page for more details: http://www.nersc.gov/research/ftg/checkpoint/. The blcr module has one SSI parameter: cr_blcr_priority blcr's default priority is 50. self CR Module The self module, when used with checkpoint/restart SSI modules, will invoke the user-defined functions to save and restore checkpoints. It is simply a mechanism for user-defined functions to be invoked at LAM's Checkpoint, Continue, and Restart phases. Hence, the only data that is saved during the checkpoint is what is written in the user's checkpoint function. No MPI library state is saved at all. As such, the model for the self module is slightly different than, for example, the blcr module. Specifically, the Restart function is not invoked in the same process image of the process that was checkpointed. The Restart phase is invoked during MPI_INIT of a new instance of the application (i.e., it starts over from main()). Multiple SSI parameters are available: cr_self_user_prefix Specify a string prefix for the name of the checkpoint, continue, and restart functions that should be invoked by LAM. That is, speci- fying "-ssi cr_self_user_prefix foo" means that LAM expects to find three functions at run-time: int foo_checkpoint(), int foo_con- tinue(), and int foo_restart(). This is a convenience parameter that can be used instead of the three parameters listed below. cr_self_user_checkpoint Name of the user function to invoke during the Checkpoint phase. cr_self_user_continue Name of the user function to invoke during the Continue phase. cr_self_user_restart Name of the user function to invoke during the Restart phase. If none of these parameters are specified and the self module is selected, it will use the default prefix lam_cr_self Finally, the usual priority SSI parameter is also available: cr_self_priority self's default priority is 25. SEE ALSO
lamssi(7), mpirun(1), LAM User's Guide LAM 7.1.4 July, 2007 lamssi_cr(7)
All times are GMT -4. The time now is 03:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy