httpd.conf edits

10 posts / 0 new
Last post
#1 Tue, 05/13/2008 - 13:10

httpd.conf edits

I need to do a few custom httpd.conf settings on the new box

1) parse all files (.html .htm .shtml) we use a lot of SSI..and with dual processors and 100 Megabit pipe with only 1 box on the router (ours) parsing all files has not caused any slow down.

2) set .gz compression for all pages.

3) add some file types to mime

Since these are site wide settings they would be made to the main httpd.conf file and not any httpd.include files for particular virtual servers/domains.

I just was curious if I can do this from the control panel. I clicked through a lot of menus and panels (probably not all) but don't see these options.

Tue, 05/13/2008 - 13:26
Joe's picture

Site-wide Apache configuration is done in the Webmin Apache module. This gives me the opportunity to point out one more source of documentation--the Webmin wiki (over 1000 printed pages of docs from both Jamie's Webmin book and mine merged into one big wiki).

To enable SSI:

gzip (or deflate) compression (note that this prevents our Analytics module from being able to insert JavaScript bugs, I think...this won't effect the log analyzers like Webalizer and AWStats, but will effect piwik and Google Analytics):

I don't believe this is in the UI. You'd need to install and enable the module--mod_gzip is a non-standard module, and I don't think it is provided by the CentOS repos (nor by us). mod_deflate, on the other hand is a standard module, and easier to use (and more compatible, since it's been a standard a lot longer).

Basically, you'd just need to load the module, and enable it either site-wide or on a per-directory basis. If you want to make it a part of only some sub-directory on your system, you could add it to your Server Template(s) in the Apache website section.

Here's the docs for mod_deflate (which I'd probably recommend over mod_gzip, due to its existence in the standard Apache'll probably be more secure and more reliable):

You can edit the Apache configuration file in the "Edit config files" page in the Apache module, or use your favorite text editor on the command line.

MIME types:


Check out the forum guidelines!

Fri, 05/23/2008 - 05:22 (Reply to #2)


I tried to follow the instructions at

However, the "Process includes on files with execute bit?" field is nowhere to be found.

VirtualMin 3.57 on Ubuntu Server 8.04LTS installed using the automatic install.

Mon, 02/13/2012 - 21:00

Bumping this topic again....are there any plans to have the compression setting options disable / enable in the module config or other module settings area?

Mon, 02/13/2012 - 22:10 (Reply to #4)

There's no support for mod_deflate specifically -- however, you can go into Webmin -> Servers -> Apache -> Global Configuration -> Configure Apache Modules in order to enable it.

Then by default, Ubuntu (which I believe I recall you're using) will configure Apache to compress html, text, and xml files.

If you wish to tweak the config, you can do so by editing /etc/apache2/mods-available/deflate.conf and restarting Apache.


Tue, 02/14/2012 - 01:33

Hi Eric : Thanks again, glad you are available for the support on this site.

Tue, 02/21/2012 - 20:33


I went in that location and I found a module called: ' deflate ' and checked it. Restarted apache, but according to an experienced programmer I know, the jqueries are still not zipping.

I dont know if its named somehting else, or do I have to load up the module in the command prompt so its visible in the list?

Tue, 02/21/2012 - 22:25

Well, remember what I mentioned above -- by default on Ubuntu, it will only compress html, text, and xml files by default.

If you want it to compress more than that, you'd need to edit /etc/apache2/mods-available/deflate.conf, and add any additional mime types that you want compressed. For example, I believe the mime type for JavaScript is "application/x-javascript".

After you add then, restart Apache, and see if that does the trick for you.


Tue, 02/21/2012 - 22:37


This is what the file has in it:

# these are known to be safe with MSIE 6 AddOutputFilterByType DEFLATE text/html text/plain text/xml

      # everything else may cause problems with MSIE 6
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
      AddOutputFilterByType DEFLATE application/rss+xml

Not sure if that reference is to the java is whats needed?

Also , along the same question, for compressing PHP files, is that a viable option as well? Finally, I have an old PHPBB2 bulletin board on the server and it has an option in the config / setup to gzip. Its always been OFF by default, but I just read it helps alot when turned on, but back then apache2 was not the httpd version mostly was likely older versions. Would it conflict with browsers if I turned it on? Seems the settings above reference IE6, so is there a chance of causing browser incompatibility when you mess with this stuff? Thanks.

Wed, 02/22/2012 - 07:43

along the same question, for compressing PHP files, is that a viable option as well?

Well, you can't compress PHP files -- you can only compress the output of a PHP application. You'd need to find a way within the application (or PHP configuration) to do that.

I've never attempted to set that up, but you'll see a lot of info on doing that if you search for "compress php output" on Google.

it was likely older versions. Would it conflict with browsers if I turned it on?

I'm unfortunately not really sure, I don't have much experience in dealing with compression :-)

I suspect most browsers would handle compression, but I really don't know, you'd have to research and/or test that.

Seems the settings above reference IE6, so is there a chance of causing browser incompatibility when you mess with this stuff?

Sure, some browsers could have trouble handling that. If compression was good for all circumstances, it would be enabled by default.


Topic locked