# httpd.conf edits

**URL:** <https://forum.virtualmin.com/t/httpd-conf-edits/29490>\
**Category:** Help! (Home for newbies)\
**Created:** [May 13, 2008, 6:10pm UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490 "2008-05-13T18:10:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![katir](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/k/ce7236/32.png) [@katir](https://forum.virtualmin.com/u/katir)\
**Post date:** [May 13, 2008, 6:10pm UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/1 "2008-05-13T18:10:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [May 13, 2008, 6:26pm UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/2 "2008-05-13T18:26:41Z")

</div>

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:

[http://doxfer.com/Webmin/ApacheWebserver#Setting\_up\_server\_side\_includes](http://doxfer.com/Webmin/ApacheWebserver#Setting_up_server_side_includes)

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 codebase…it’ll probably be more secure and more reliable):

[http://httpd.apache.org/docs/2.0/mod/mod\_deflate.html](http://httpd.apache.org/docs/2.0/mod/mod_deflate.html)

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:

[http://doxfer.com/Webmin/ApacheWebserver#Adding\_and\_editing\_MIME\_types](http://doxfer.com/Webmin/ApacheWebserver#Adding_and_editing_MIME_types)

---

<div class="post-metadata">

**Author:** ![stpeters](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/3ab097/32.png) [@stpeters](https://forum.virtualmin.com/u/stpeters)\
**Post date:** [May 23, 2008, 10:22am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/3 "2008-05-23T10:22:00Z")

</div>

Joe,

I tried to follow the instructions at [http://doxfer.com/Webmin/ApacheWebserver#Setting\_up\_server\_side\_includes](http://doxfer.com/Webmin/ApacheWebserver#Setting_up_server_side_includes)

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.

---

<div class="post-metadata">

**Author:** ![techforce](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/9e8a1a/32.png) [@techforce](https://forum.virtualmin.com/u/techforce)\
**Post date:** [February 14, 2012, 3:00am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/4 "2012-02-14T03:00:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [February 14, 2012, 4:10am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/5 "2012-02-14T04:10:33Z")

</div>

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.

-Eric

---

<div class="post-metadata">

**Author:** ![techforce](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/9e8a1a/32.png) [@techforce](https://forum.virtualmin.com/u/techforce)\
**Post date:** [February 14, 2012, 7:33am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/6 "2012-02-14T07:33:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![techforce](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/9e8a1a/32.png) [@techforce](https://forum.virtualmin.com/u/techforce)\
**Post date:** [February 22, 2012, 2:33am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/7 "2012-02-22T02:33:42Z")

</div>

Eric:

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.

[http://postimage.org/image/vt5zjcfb9/](http://postimage.org/image/vt5zjcfb9/)

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?

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [February 22, 2012, 4:25am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/8 "2012-02-22T04:25:07Z")

</div>

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.

-Eric

---

<div class="post-metadata">

**Author:** ![techforce](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/9e8a1a/32.png) [@techforce](https://forum.virtualmin.com/u/techforce)\
**Post date:** [February 22, 2012, 4:37am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/9 "2012-02-22T04:37:16Z")

</div>

Eric:

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 used…it 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.

---

<div class="post-metadata">

**Author:** ![Eric](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/898d66/32.png) [@Eric](https://forum.virtualmin.com/u/Eric)\
**Post date:** [February 22, 2012, 1:43pm UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/10 "2012-02-22T13:43:33Z")

</div>

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.

-Eric

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 5:30am UTC](https://forum.virtualmin.com/t/httpd-conf-edits/29490/11 "2020-04-30T05:30:20Z")

</div>

Closed on April 30, 2020, 5:30am UTC


