Jump to content

scrupul0us

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by scrupul0us

  1. in the httpd.conf file... make sure for the "pics" folder you have "allowoverrides" in the options also # allow server (this for scripts, etc to work): allow from 192.168.150.156 if that IP is the same server as apache then this line isnt needed as the server will allow itself unless DENY is explicitly set elsewhere
  2. might also want to use the limit directive on the directory to only allow GET access as an added level of security
  3. Is there a way to setup a directory such that only localhost/127.0.0.1 is allowed indexes, otherwise you get a denied page? I'm using Apache/2.2.4 (Win32)
  4. ok that i didnt realize... i perhaps thought u had a handful of users... i am much like u then, clueless sorry dude
  5. and Name <CBandUser> Description Define a new cband user Context Server config Syntax <CBandUser user_name>
  6. then: Name CBandUserLimit Description Specifies bandwidth limit for a cband user Context <CBandUser> Syntax CBandUserLimit limit limit - bandwidth quota size, available units: K (kilo), M (mega), G (giga), Ki (kibi), Mi (mebi), Gi (gibi) Example CBandUserLimit 10M Specifies 10 * 1000 * 1000 bytes bandwidth quota CBandUserLimit 10Mi Specifies 10 * 1024 * 1024 bytes bandwidth quota
  7. its exactly what u want: http://cband.linux.pl/ Name CBandLimit Description Specifies bandwidth limit for virtualhost Context <Virtualhost> Syntax CBandLimit limit limit - bandwidth quota size, available units: K (kilo), M (mega), G (giga), Ki (kibi), Mi (mebi), Gi (gibi) Example CBandLimit 10M Specifies 10 * 1000 * 1000 bytes bandwidth quota CBandLimit 10Mi Specifies 10 * 1024 * 1024 bytes bandwidth quota Name CBandExceededURL Description Specifies a URL where mod_cband should redirect all requests to a virtualhost when the configured transfer limit is exceeded NOTE: If you don't specify the exceeded URL location then standard 503 Service Unavailable will be sent Context <Virtualhost> Syntax CBandExceededURL URL Name CBandPeriod Description Specifies a period after which a virtualhost's usages are cleared Context <Virtualhost> Syntax CBandPeriod period period - available units: S (seconds), M (minutes), H (hours), D (days), W (weeks) Example CBandPeriod 1W CBandPeriod 14D CBandPeriod 60M just do some reading mang
  8. first off... u have to specify what type of files... and it all has to be within the <files> or as preferred <filesmatch> construct <FilesMatch "^\.ht"> Order allow,deny Deny from all </FilesMatch> that will block all access to and file starting with .ht example: .htaccess i suggest you start reading the manual on the apache.org website...
  9. <directory "/cgi-sys/scgiwrap/"> options None allowoverride None order deny, allow deny from all allow from 127.0.0.1 <directory> put that in your httpd.conf
  10. no sir... apache runs as "apache".... not as "administrator" and i have its files locked down accordingly
  11. id suspect theres no group called apache on your system since: httpd: bad group name apache indicates that apache is the faulty group name
  12. has anyone figured out how to run httpd.exe from the cmd line and have it no leave that annoying window open? or at the very least have it prompt you to start/stop/restart the server?
  13. Well after a couple of months ive figure out (on a win32 box at least) how to implement mod_auth_mysql First the setup apache 2.2.4 php 5.2.3 mysql 5.0.41 Now we need the auth module (i used DSO or .SO.. same thing) head over to the XAMPP website and grab this file: http://www.apachefriends.org/download.php?xampp-win32-1.6.2.zip (thats the loose pack for their latest release that includes the mod_auth_mysql.so) grab the file from the archive xampp\apache\modules\mod_auth_mysql.so and drop that into your current apache modules directory Configuring Apache to use the module -Edit your httpd.conf file and add this: LoadModule mysql_auth_module modules/mod_auth_mysql.so to the rest of your modules -at the very bottom add this <Directory "*****PATH*****"> AuthName "MySQL Testing" AuthType Basic AuthMySQLHost localhost AuthMySQLUser mod_auth AuthMySQLPassword mod_auth AuthMySQLDB mod_auth_mysql AuthMySQLUserTable user_info AuthMySQLNameField user_name AuthMySQLPasswordField user_passwd AuthMySQLPwEncryption md5 AuthMySQLEnable On require valid-user </Directory> (make sure you replace the *****PATH***** to reflect the directory you are protecting) (also you need to create this directory in your htdocs structure) Configure mysql -import this dump inside of a new database called mod_auth_mysql CREATE TABLE `user_info` ( `user_id` int(11) NOT NULL auto_increment, `user_name` char(30) collate utf8_unicode_ci NOT NULL, `user_passwd` varchar(32) collate utf8_unicode_ci NOT NULL, `user_group` char(10) collate utf8_unicode_ci default NULL, PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; And that should work perfectly... hope that helps... feel free to post questions... il ltry to answer them
  14. Does the Apache 2.2.* tree have a package availble that is already "built" but doesnt come with an installer? i downloaded the "httpd-2.2.4-win32-src.zip" but it doesnt come with apache.exe already built and i have no idea on a win32 machine how to build the executable i checked the other available packages but they include installers and i dont want to use an installer any ideas? Thanks, Brian
  15. IS there a way to setup a directory with auth such that i dont give it a username/password of anytype BUT i can pass headers to apache via PHP to authenticate basically what im trying todo is authenticate users on my front end using MySQL and then send them to a protected directory underneath that main root if you will... right now the main root doest allow indexes BUT if you know the directory name under that root you can load its contents just fine (i am using satisfy all) so in short: -even if you know the correct directory and proceed to it youll get bounced back to the "root" -if you are authenticated via php & mysql send a header to apache that says this user is good allow them in
  16. hows this look: $expire = strtotime("midnight today"); $ip = $_SERVER['REMOTE_HOST']; //db connect stuff $result = mysql_query("SELECT ip, UNIX_TIMESTAMP(date) as date FROM stats WHERE ip = $ip"); if (mysql_num_rows($result) == 0) { //insert stats } else { $last = array_pop($result) if ($last['date'] > $expire) { //insert stats } } mysql_free_result($result);
  17. thanks man... thats what ill end up doing... time to break out my trusty notebook and write some pseudo code
  18. I'm tryin to make a table that will hold browser stats... i want to be unique based on a midnight to midnight period and only add one record per IP address on any given day so far i have this: $query = " INSERT INTO stats (bid,bname,bversion,osname,osversion,type,ip,lang) VALUES ('$stats[0]','$stats[1]','$stats[2]','$stats[3]','$stats[4]','$stats[5]','$stats[6]','$stats[7]') WHERE (ip <> '$stats[6]')"; but it fails on the where condition... and that only checks for the IP address... i have NO idea how to have it check for date time.. i will add that the column that i use to track time i a mysql timestamp type that is set to "update timestamp or update" any ideas?
  19. just leave it on your fat32 and in your linux httpd.conf set the document root to that directory
  20. idk if u can use this: http://httpd.apache.org/docs/1.3/mod/core.html#maxrequestsperchild or as an idea: maybe you can trap the F5 key with javascript... that is to say, it will detect if its been pressed, but if exceeds 'x' time then redirect to about:blank :shrugs: maybe?
  21. is there a way to specify the upload speed for a folder? once a week i left two - three users downloaded a webstream i record and it kills my server b/c of the connection im on... id liket o be able to limit the upload rate
  22. Im surprised there isnt a sticky here for common usages Heres how to prevent image hotlinking... place this in a .htaccess file in your server root RewriteEngine on RewriteCond %{HTTP_REFERER} . #THIS WILL ALLOW GOOGLE RewriteCond %{HTTP_REFERER} !google\.com [NC] #THIS WILL ALLOW YOUR DOMAIN RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain\.com [NC] RewriteRule \.(jpe?g|gif|png|bmp)$ - [NC,F] #OPTIONAL REDIRECT TO A DIFF PAGE #RewriteRule (.*) /no_hotlinking.php?/$1 [R,NC,L]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.