I'm running into an issue where certain URLs passed to my Elastic Beanstalk Environment are containing slashes inside the URL's parameters e.g.:
https://example.com/param1=this/that/param2=....
These URL's are valid in the context that my application can process the slashes correctly in local testing. In production on EB, the Apache server EB uses as default decodes the slashes, causing 404's to be returned to the user. I am not very up to date on my Apache knowledge. What is the best and most efficient way to set the argument: AllowEncodedSlashes NoDecode
in my Apache configurations dynamically on envrionment launch?
Obviously, ssh-ing into my instances to make the change is far from ideal and will not last past a reload. Is it possible to set it using my applications .ebextensions in some way?
EDIT:
To give some more details, I am using a load-balanced EB environment that uses HTTPS and is running a Django application (with mod_wsgi)
This is my wsgi.conf file taken from one of my instances:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /opt/python/run/baselinenv
WSGISocketPrefix run/wsgi
WSGIRestrictEmbedded On
<VirtualHost *:80>
Alias /static/ /opt/python/current/app/static/
<Directory /opt/python/current/app/static/>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /opt/python/current/app/test_app/wsgi.py
AllowEncodedSlashes NoDecode
<Directory /opt/python/current/app/>
Require all granted
</Directory>
WSGIDaemonProcess wsgi processes=1 threads=15 display-name=%{GROUP} \
python-path=/opt/python/current/app:/opt/python/run/venv/lib64/python3.4/site-packages:/opt/python/run/venv/lib/python3.4/site-packages user=wsgi group=wsgi \
home=/opt/python/current/app
WSGIProcessGroup wsgi
</VirtualHost>
LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
Is this the file I have to edit? Wouldn't the EB enviornemnt overwrite my changes on an environment reboot?