![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Dec 2006
Posts: 463
|
ATX and lighttpd
Does anyone use ATX with lighttpd?
I cannot make the in.cgi work on the index page because lighttpd does not have virtual() in php. Has anyone found a way around this?
__________________
ICQ: 335034 For sale: oojz.com / upbot.com / iMarijuana.com / toughmarketing.com / playfulencounter.com (website included) Misc.: 2x ATX2 licenses ($50 each) ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: May 2002
Location: European Union
Posts: 3,815
|
A plain SSI Include doesn't work either?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
__________________
History will be kind to me for I intend to write it. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Dec 2006
Posts: 463
|
cgi itself works, it's just the virtual function is missing from php and does not work in ssi.
I really wanted to run lighttpd and I think it's stupid to run apache just for something like this. Either I will have to figure out a work around or move to apache. ![]()
__________________
ICQ: 335034 For sale: oojz.com / upbot.com / iMarijuana.com / toughmarketing.com / playfulencounter.com (website included) Misc.: 2x ATX2 licenses ($50 each) ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
__________________
History will be kind to me for I intend to write it. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
You can always proxy lighthttpd to apache.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Dec 2006
Posts: 463
|
Quote:
Nothing works. It is hard searching for this issue because the only thing that really comes up is lighttpd virtual host issues. If it's even possible, I will figure it out and when I do I will post for others. Thanks for the replies.
__________________
ICQ: 335034 For sale: oojz.com / upbot.com / iMarijuana.com / toughmarketing.com / playfulencounter.com (website included) Misc.: 2x ATX2 licenses ($50 each) ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Dec 2006
Posts: 463
|
<?php
# Change this to the full path of in.cgi $CGISCRIPT="/full/path/cgi-bin/a2/in.cgi"; putenv('REQUEST_METHOD=GET'); if(isset($_SERVER['QUERY_STRING'])) putenv('QUERY_STRING='.$_SERVER['QUERY_STRING']); if(isset($_SERVER['HTTP_USER_AGENT'])) putenv('HTTP_USER_AGENT='.$_SERVER['HTTP_USER_AGENT']); if(isset($_SERVER['HTTP_VIA'])) putenv('HTTP_VIA='.$_SERVER['HTTP_VIA']); if(isset($_SERVER['HTTP_CACHE_CONTROL'])) putenv('HTTP_CACHE_CONTROL='.$_SERVER['HTTP_CACHE_CONTROL']); if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) putenv('HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR']); if(isset($_SERVER['HTTP_REFERER'])) putenv('HTTP_REFERER='.$_SERVER['HTTP_REFERER']); if(isset($_SERVER['HTTP_COOKIE'])) putenv('HTTP_COOKIE='.$_SERVER['HTTP_COOKIE']); putenv('REMOTE_ADDR='.$_SERVER['REMOTE_ADDR']); unset($return_array); exec($CGISCRIPT, $return_array, $return_val); $firstline=array_shift($return_array); echo implode($return_array,"\r\n"); ?> Works like a charm now! ![]()
__________________
ICQ: 335034 For sale: oojz.com / upbot.com / iMarijuana.com / toughmarketing.com / playfulencounter.com (website included) Misc.: 2x ATX2 licenses ($50 each) ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Dec 2006
Posts: 463
|
![]() Here is the vhost part for lighttpd and a site running smart thumbs and atx
var.vhostdir = "/usr/local/www/vhosts" $SERVER["socket"] == "x.x.x.x:80" { $HTTP["host"] =~ "(^|\.)domain\.com$" { alias.url += ( "/cgi-bin" => vhostdir + "/www.domaincom/cgi-bin" ) server.document-root = vhostdir + "/www.domain.com/htdocs" accesslog.filename = vhostdir + "/www.domain.com/logs/access.log" server.errorlog = vhostdir + "/www.domain.com/logs/error.log" $HTTP["host"] =~ "^domain\.com$" { url.redirect = ( "^/(.*)" => "http://www.domain.com/$1" ) } auth.backend = "htpasswd" auth.backend.htpasswd.userfile = vhostdir + "/www.domain.com/htdocs/st/admin/.htpasswd" auth.require = ( "/st/admin/" => ( "method" => "basic", "realm" => "SmartThumbs admin", "require" => "valid-user" ) ) } } Since .htaccess doesn't work with lighttpd you will also need to make a index.php in /st/admin/ with this: <?php header('Location: rotator.php'); ?> Then instead of putting: <?php virtual ("/cgi-bin/a2/in.cgi"); ?> Put this: <?php $CGISCRIPT="/usr/local/www/vhosts/www.domain.com/cgi-bin/a2/in.cgi"; putenv('REQUEST_METHOD=GET'); if(isset($_SERVER['QUERY_STRING'])) putenv('QUERY_STRING='.$_SERVER['QUERY_STRING']); if(isset($_SERVER['HTTP_USER_AGENT'])) putenv('HTTP_USER_AGENT='.$_SERVER['HTTP_USER_AGENT']); if(isset($_SERVER['HTTP_VIA'])) putenv('HTTP_VIA='.$_SERVER['HTTP_VIA']); if(isset($_SERVER['HTTP_CACHE_CONTROL'])) putenv('HTTP_CACHE_CONTROL='.$_SERVER['HTTP_CACHE_CONTROL']); if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) putenv('HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR']); if(isset($_SERVER['HTTP_REFERER'])) putenv('HTTP_REFERER='.$_SERVER['HTTP_REFERER']); if(isset($_SERVER['HTTP_COOKIE'])) putenv('HTTP_COOKIE='.$_SERVER['HTTP_COOKIE']); putenv('REMOTE_ADDR='.$_SERVER['REMOTE_ADDR']); unset($return_array); exec($CGISCRIPT, $return_array, $return_val); $firstline=array_shift($return_array); echo implode($return_array,"\r\n"); ?> Other then these couple of tweaks everything else is the same. Frank is adding the above php code to the arrow scripts knowledge base. If anyone wants to use lighttpd and can't get it working, just hit me up on icq and I will help you out.
__________________
ICQ: 335034 For sale: oojz.com / upbot.com / iMarijuana.com / toughmarketing.com / playfulencounter.com (website included) Misc.: 2x ATX2 licenses ($50 each) ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |