Is there a way to enable this module on nginx ? http://wiki.nginx.org/HttpMp4Module
I have already many domains running on nginx and I can't just remove it and rebuilt everything .
I tried downloading latest nginx, and do ./configure --with-http_mp4_module
and make
then make install
but it didn't worked. Also I am afraid that this recompile process will delete all my conf and domain settings.
Install:
Example configuration:
Firstly, backup your nginx config folder (/etc/nginx) - if your configs are valuable to you, then you certainly need an extra copy in case anything goes wrong. That said, most installations do not overwrite the existing configs.
Secondly, for a proper configure line, run
nginx -V
(with your working nginx), and then add the additional configure statement, there are likely other configuration parameters that are relevant to your setup. (This will also let you verify whether or not the module is already compiled into the version you are running.) (Also, you said it 'didn't work' - why? What was the error?). The default nginx configure statement (x86) is:Finally, if you don't have specific optimizations in place (e.g. you have removed certain modules, etc) you can use the nginx repository (available for RHEL/CentOS, Debian/Ubuntu) - the published binaries include the module you are looking for (as per the config statement above) and the repository makes it easier to maintain (the downside being the lack of customization, but sometimes, it is a worthwhile price to pay).
The repository version does not overwrite your configurations, but if there are new config files it will add them - this has been an issue for some configurations with the newer versions, since /etc/nginx/conf.d/default.conf is added - which specifies an additional server that may not be compatible with existing configurations. (You can just rename this file, or even copy back your entire /etc/nginx folder to restore your old config)