News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Can you review this posted config in 5 min?

Started by luvit, April 02, 2008, 06:07:21 PM

Previous topic - Next topic

luvit

if you have a few minutes i'm posting my configs. i hope i laid it out for ease.
600Mhz Celeron, 256MB RAM, 10GB HD for a Closed Forum, 150 registered members, 5-10 active at once.

the empty httpd.conf file confuses me a little...

  • Apache with AcceptPathInfo set to On...

    • this file was totally empty: /etc/apache2/httpd.conf
    • i edited it anyway and it has this single line of syntax without equal sign:

      • AcceptPathInfo On

  • /etc/php5/apache2/php.ini:

    • the engine directive must be On. (default)
    • the magic_quotes_sybase directive must be set to Off. (default)
    • the session.save_path directive must be set to a valid directory.
    • i uncommented the following default: ;session.save_path = /var/lib/php5
    • the file_uploads directive must be On. (default)
    • the upload_tmp_dir must be set to a valid directory.
    • i uncommented default: ;upload_tmp_dir =
    • then added /tmp --> upload_tmp_dir = /tmp

    • the max_input_time directive is set to a value of at least 30. (set @default of 60)
    • the post_max_size (default was 8M) and upload_max_filesize (default was 2M)directives are set to the size of the largest attachments you wish to be able to upload.
    • the session.use_trans_sid directive set to Off. (set @default: session.use_trans_sid = 0)

    • the memory_limit directive is set to at least 8M. (set @ 36M)

      • remember i have a total of 256MB of RAM

    • the max_execution_time directive is set to at least 15. (set @default of 30)
    • the register_globals directive is set to Off. (default)
thanks again for taking a few minutes to review! :)
i did test this without any user load and it was fast, but may not be optimal.

rsw686

Lower the memory_limit. That is the amount of memory any php script can take. On my forum I needed a value of 36M to allow users to upload 3MB avatar pictures.

The httpd.conf is for backwards compatibility. There is a apache2.conf file where the settings are. The default virtual host settings are in the sites_available/default file.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

luvit

#2
Quote from: rsw686 on April 03, 2008, 12:24:28 AM
The httpd.conf is for backwards compatibility. There is a apache2.conf file where the settings are. The default virtual host settings are in the sites_available/default file.
thanks for the input,rsw686! i will follow the memory_limit advice.

can you clarify your 2nd paragraph? i'm such a newbie. lol.
i'll leave the AcceptPathInfo On in the httpd.conf file, right?

are you saying the AcceptPathInfo On needs to be added to apache2.conf also? (which section of the file?)

i don't understand your last statement "The default virtual host settings are in the sites_available/default file."

-- thanks again rsw686!

rsw686

Other linux distributions like redhat call apache2 httpd. Since ubuntu decided to call the config file apache2.conf they added a blank httpd.conf to maintain compatibility between applications that install changes into the httpd.conf file. If I remember correctly the apache2.conf file includes the httpd.conf file. You can place your options in either file, it is really more of a personal preference. It is just that you will find the already defined settings in apache2.conf.

Apache is capable of hosting multiple websites. The sites-available directory allows you to create a config telling apache where each site is, the domain name to display it under, the options for that site, etc. Since you have only one site you can place the changes under apache2.conf or the sites-available/default file.

However what normally is done is global settings that would apply to all sites are placed in the apache2.conf. Then settings for individual sites are set in that site only. The sites that are enabled are symlinked to sites-enabled. The a2ensite and a2dissite are using to enable / disable additional sites.

The same thing goes for modules. modules-available is all the possible modules. a2enmod and a2dismod will enable / disable available mods. The enabled modules are listed in modules-enabled. For example you could enable the spelling module to be used by the spell checker in SMF with a2enmod spelling

On the memory_limit you can even go lower than 36M. Just test everything out on the forum and make sure you don't get a blank page. If you do it will show in your error log a statement about not being to allocate enough memory. Then just increase until you don't experience that. Most likely uploading the avatars will be the only thing to eat up that much memory. My site was running with 16M just fine, but members had issues with the avatars.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

luvit

you posted great stuff. i think i understand, really.

thanks for info on enabling spelling... i can't wait until i can install smf in production.
i'm taking my time and conducting a big full system backup before i deploy in case i need to immediately change anything that's major.

Advertisement: