It would be nice to have the possibility to choose between Apache/Nginx on project setup.
@misterboe Hello! Welcome and thank you for posting. To help us better understand the motivating factors, can you provide us some additional context? Do you have a heavy reliance on .htaccess? Need better parity with a specific hosting provider's infra?
This actually relates to a much larger question of how many dimensions we can/will support officially with test coverage. Filing another issue https://github.com/drud/ddev/issues/629 noting this as a use case.
I think the most people working with TYPO3 use Apache (also WP Drupal etc.). The main reason could be that the most shared hosting services only offer to use apache (Mittwald, JWeiland, 1und1, Strato ...). Configure nginx on shared hosting environments would be much more complicated as far as i know.
Also TYPO3 delivers its default settings in an example .htaccess. So the possibility to choose between apache or nginx would be great.
We definitely see the need and I want to be thoughtful in how we proceed. Therefore, I'm going to focus on the upstream issue #629 because managing containers can become unwieldy if we don't approach this with the right strategy.
I think the most people working with TYPO3 use Apache
Can confirm, I would need this feature too ;)
I'd be interested to hear why the particular webserver matters for TYPO3 development. My experience with sites is that if nginx or apache is properly configured there's no difference at all (in my experience) in the behavior of the site, except that nginx/php-fpm (or apache with fpm) is vastly faster.
The reality though is I can pretty easily envision how to do apache without even having a separate container.
I know it's all about correct configuration, but not always server type can be choosed.
What about this config
server: [nginx|httpd] or something similar to php_version: "7.1"
But I guess new docker image is required, so instead of
webimage: drud/nginx-php-fpm-local:v0.9.3
webimage: drud/httpd-php-local:vX.Y.Z
So lets outline everything that would be affected by this decision so better determine the right approach and the approximate level of effort.
FWIW, I know we were able to provide an option to toggle PHP in a single container. I think we probably go the single container route for now, but ultimately we may need to split this out down the road.
If anyone else has any other considerations to add, please voice them. Otherwise, this would inform the acceptance criteria we use to make this actionable.
We'll have to decide which Apache route we go, apache+fpm or apache with php plugin.
This does not have to be done in an additional container, but instead can be selected in the same way we select PHP versions.
Hi any news about this?
I was testing it and ddev is really great and super time saver. But only this one thing blocks us to use it in real life.
@ogrosko this has not been prioritized yet, but we very much care about your opinion. However, it's really important for somebody to explain in this issue why this blocks them. Why does it block you? Most web developers have no idea how the webserver works or whether it's apache or nginx or something else and most PHP sites work exactly equivalently on any webserver technology. So please explain the full details of why this is important, so that we can understand and prioritize.
In many cases we don't have access to server configuration and we have to set many things via .htaccess file. Like redirects, caching, compression, directory access restrictions, etc.
To be honest, all websites I developed are based on apache. Also typo3 deliver config in .htaccess file as default.
Thank you.
I also wanted to test ddev as dev environment for the new typo3.org page. This also was not possible without having the configuration from the .htaccess.
Please say more about why you couldn't test it. What specifically went wrong that you couldn't? One intermediate thing we may want to do is a little faq about problems Apache users might have. Is there an easy way I can replicate the problem you had?
Just throwing out an example. Way back when (gosh, probably Drupal 6 or WordPress 3.X days), not having Apache w/.htaccess would result in issues around clean-URLs not being enabled, which meant that users would have .com/?q=user instead of .com/user. To that end, there shouldn't be something necessarily prohibiting TYPO3.org being stood up on nginx, but there might be specific issues that crop up. Knowing what those would be can help us get similar adjustments in the nginx configurations (when/where possible) so that this isn't an issue with needing Apache as much as ensuring nginx has a similar set of configurations/features enabled.
Please provide apache! Need this!
Looking forward to the apache feature!
I need an apache to test htaccess files I dont generate myself. In projects where I get provided a faulty htaccess there would be no way to know whether my nginx configuration is the root of the problem or if the htaccess itself causes an issue.
need this too!
@rickmanelius my main problem is, that (honestly) all of our providers have apache running. Sure, i can develop using nginx but in my point of view i would love to develop as close to the live-server as possible.
I was on a call today where this was again surfaced. There were a few specific items called out.
On the flip side, supporting Apache in addition to nginx has some requirements before just adding it as a toggle within config.yml. Those were noted here https://github.com/drud/ddev/issues/628#issuecomment-370951621.
I'm all for the simplest path forward, but I do want to highlight some of the factors that would be part of the conversation and the LOE to create as well as maintain this!
Mostly this isn't that hard. The real problem is satisfying people, because it's not one-size-fits-all. As mentioned in https://github.com/drud/ddev/issues/628#issuecomment-370957353 there are many ways of doing "apache" with php. The most obvious way forward for us would be apache with php-fpm. But would that work? Would people be happy? It would get them .htaccess. Maybe that's the key thing.
looking forward for an option to use apache too. currently all projects we do for every customer run on apache. i only know of 2 hosters which we used where we could change server configurations which would be needed for nginx. as others already stated most of the hosters offer only apache.
for a lot of projects we mainly depend on .htaccess files for redirects, cache configurations and url rewriting. in a few cases environment variables which are set via .htaccess and cannot be used by an .env file (conditions for folders/files anything which isn't redirected to the application and so cannot use variables defined in an .env file (dotenv for php).
besides that ddev looks really cool. would love to use it but no apache is currently our showstopper to use it like others stated before.
Definitly add apache !
I have evaluated ddev and prepeared a couple of our customer projects with test ddev enviroments. For that i have manuel done the htaccess conversion and adding to ngnix. For me this wouldn't be a problem, but the main reasons to need apache are:
For me it would be a pleasure to go through all of our projects which are under our maintenance and provide the configs, but not having apache will be a show stopper.
So really looking forward to it.
I would give ddev a chance if it would support apache (with php-module, not fpm). All our costumers are using apache as webserver and i want to have my dev-environment as similar as possible to prod-server.
Some infos about this feature request? would ddev give a chance, too if it would support apache
Also wanted to take ddev for a spin today because it seems to ease up a lot of manual docker or vagrant customization. Previously I used Homestead w/Vagrant, but my older version of it doesn't support toggling between PHP versions.
However my experimentation came to a dead halt when I saw that nginx is the only option so far. I really need .htaccess Apache rules (also for Authentication plus TYPO3 settings) and need to keep my machine as close to the production machine as possible.
It would be a huge benefit (for me) to have the ability to use Apache plus being table to toggle different php-fpm/cgi versions.
We hear you! We're going to prioritize getting Apache as an option for ddev projects. Thanks for letting us know!
Added to v1.1.0, we've decided this is high value and not too hard, time to move on it.
For everyone following this issue, just noting there is a PR to review https://github.com/drud/ddev/pull/1007.
Most helpful comment
We hear you! We're going to prioritize getting Apache as an option for ddev projects. Thanks for letting us know!