| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| allstats.de 
 
 
 
 | 
			
				|  Posted: Wed Aug 13, 2008 1:11 am    Post subject: witch webserver to serve files as-is ? |   |  
				| 
 |  
				| In order to setup my own content server i am looking for a small webserver to server unparsed content as needed. 
 I tried out the thttpd because its very very small. But the other side of this little throtteling webserver is, it allways parses the contents of the files
   
 Now im lost in searching around for an alternative. Maybe there is only the indian left to use, is it?
 
 And how to shrikt this monster down to save system ressources?
 
 Sorry for my bad english.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| adbot 
 
 
 
 | 
			
				|  Posted: Thu Mar 31, 2011 3:57 am |  |  
				| 
 |  
				|  |  | 
|   | 
	
		| Kybber 
 
 
 
 | 
			
				|  Posted: Wed Aug 13, 2008 10:39 am    Post subject: |   |  
				| 
 |  
				| Perhaps lighttpd? |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| allstats.de 
 
 
 
 | 
			
				|  Posted: Thu Aug 14, 2008 3:44 pm    Post subject: |   |  
				| 
 |  
				| And how do i treat this pretty little pice of code not to parse content? 
 Anyone knows?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| Kybber 
 
 
 
 | 
			
				|  Posted: Thu Aug 14, 2008 5:20 pm    Post subject: |   |  
				| 
 |  
				| Are you sure lighttpd parses content by default? |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| allstats.de 
 
 
 
 | 
			
				|  Posted: Thu Aug 14, 2008 10:06 pm    Post subject: |   |  
				| 
 |  
				|  Hö, should i ll try this? I think i should. |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| allstats.de 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 5:19 am    Post subject: |   |  
				| 
 |  
				| Hm, all the transfered files get the -x flag so they are not executable on the gamehost. Whats wrong with my lighttpd? |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| Kybber 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 7:14 am    Post subject: |   |  
				| 
 |  
				| Probably nothing  Files downloaded via HTTP don't preserve their original attributes.
 
 To make files get the +x attribute, simply create
 a text-file called gamename.op.txt (for instance
 cssource.op.txt) in your linux-dir alongside all
 the other .txt-files. In that file you list the files
 which should be +x. Then rerun build-update.php.
 
 You don't really need to add the file which is
 executed by GC as it will be made executable
 anyway, but it doesn't hurt to have it in there.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| allstats.de 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 8:02 am    Post subject: |   |  
				| 
 |  
				| thank you |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| chiva 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 8:07 am    Post subject: |   |  
				| 
 |  
				| do you know how to do the same with apache but telling him not to parse the content of one folder?? 
 I think parsing should not mind while you dont have to download html/php/etc code file
 
 Am i correct?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| Kybber 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 8:19 am    Post subject: |   |  
				| 
 |  
				| Just so we don't misunderstand eachother: The .op.txt-files are webserver-irrelevant. All
 they do is tell the GC client on your host that
 when it has downloaded a game from the web-
 server, it should chmod +x those files. Doesn't
 matter if it's lighttpd or apache.
 
 Two minutes of googling took me here:
 http://httpd.apache.org/docs/2.2/mod/mod_mime.html#removetype
 
 So try something like this in your apache config:
 
  	  | Code: |  	  | <Directory "/path/to/my/gc/contentmaster"> RemoveType .php
 </Directory>
 | 
 (remember to reload or restart Apache)
 Or simply add
 
 in a .htaccess file in your contentmaster dir,
 provided your config file allows you to perform
 this override.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| chiva 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 8:56 am    Post subject: |   |  
				| 
 |  
				| Could you tell me what did you put in google? I have been searching for it this morning (europe) and found nothing.
 I tried with 'apache dont parse' and things like that, but nope.
 
 For others: if using .htaccess remember to allow them changing AllowOverride to All at the apache's config of your virtual host
 
 Thanks for the fast reply
 
 P.S: How do you know so much kybber? Hahaha
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| Kybber 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 9:23 am    Post subject: |   |  
				| 
 |  
				| I first wanted to find out how to make apache parse, so I searched for "apache parse php".
 The first hit showed me how to use AddType.
 So I figured there would probably be a directive
 to do the opposite and searched for "apache addtype"
 to look for the manual. Hopefully the reverse
 directive would be described alongside AddType,
 and lo and behold it was
  I then replaced '1.3' in the URL with '2.2', verified the directive was
 still existent and pasted it in here
   
 I've been using GC for almost three years now,
 and I think Andrew, one of the devs, can vouch
 that I am a pretty demanding user - in some
 cases I am sure I exploit GC's more intricate
 parts harder than the devs themselves
   
 BTW: Using .htaccess files is less efficient than
 adding the directives to your config files since
 Apache needs to look for and read the .htaccess
 files of every parent-dir every time it tries to
 access a file (a few thousand times for a typical
 game installation). If you instead specify
 AllowOverride None, and add the directives to
 your config-files, then Apache won't waste any
 time looking for the .htaccess files.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		| chiva 
 
 
 
 | 
			
				|  Posted: Thu Aug 28, 2008 6:46 pm    Post subject: |   |  
				| 
 |  
				| Yep, I like modyfing apaches config directly .htaccess are there because of shared hosting
 
 Now, i will start making content packages...
 
 Thanks again
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
	
		|  |