View Full Version : Cli
daveyw
01-24-2007, 01:08 PM
Hello,
One of my customers want to use shtml (server side scripting). But when i try's the page is black.
And on another host its shows the day from today
Can someone help?
IWorx-Socheat
01-24-2007, 01:45 PM
Look in /etc/httpd/conf/httpd.conf for the following two lines:
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
Uncomment them. Then, for each account that you want to enable SSI on, edit their vhost conf file (/etc/httpd/conf.d/domain.com.conf) and add Options +Includes:
<Directory /home/domainco/domain.com/html>
AllowOverride AuthConfig FileInfo Options Limit Indexes
Options +ExecCGI +Includes
</Directory>
Then restart Apache.
daveyw
01-24-2007, 01:53 PM
it work's now, but can i set it default enable for all users?
IWorx-Socheat
01-24-2007, 02:03 PM
You could probably add:
Options +Includes
To the main httpd.conf file. Check the Apache docs because Apache has specific rules on how overlapping Options directives are merged:
http://httpd.apache.org/docs/2.0/mod/core.html#options
http://httpd.apache.org/docs/2.0/sections.html#mergin
daveyw
01-24-2007, 02:21 PM
Thanks, it works now ;-)
pascal
02-04-2007, 11:06 AM
I really recommand to also set
IncludesNOEXEC
To not able your client to do something like
<pre>
<!--#exec cmd="cat /etc/passwd" -->
</pre>
well to not allow your client to execute a sh script/binary
Pascal
daveyw
02-04-2007, 11:18 AM
Then it will like this:
Options +Includes IncludesNOEXEC
?
pascal
02-04-2007, 03:41 PM
No only do
+IncludesNOEXEC
For example create an shtml file with :
<!--#config timefmt="%A %d %B %Y" -->
Today is <!--#echo var="DATE_LOCAL" -->
<br />
<!--#exec cmd="ls /home/account/public_html/" -->
You'll then see
Today is Sunday 04 February 2007
[an error occurred while processing this directive]
The Exec is rejected
Pascal
daveyw
02-28-2007, 09:41 AM
Late response but thanks, yes i got
the date.......
[an error occurred while processing this directive]
Thanks, great ;-)
pascal
02-28-2007, 10:24 AM
happy to know it works ;)
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.