-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP downloads for Static #330
Comments
Ok... Seemingly making progress. Found this resource, how to set up a PHP container with NGINX docker. https://blog.devsense.com/2019/php-nginx-docker I tried it and it basically destroyed the entire setup I had working. So the questions I have now is: Q1. How to reconcile the DOCKERFILE provided with SteveLNT/https-portal with the changes to "default.conf" in the article. Q2. In my docker cofig (that worked) I had DOMAINS: 'stat.mysite.com, I am sorry that these questions are so basic. But it would really help others (of my low skill level) implementing SteveLTN/https-portal for PHP enabled 'static' websites. |
Update: Ok... what do you know... Reading Documentation might have the answer! Stay tuned. Would be nice to solve my own 'query' that migh help future people :-) |
@Mr-Wulf i would be interested in your solution, looks like i'll be facing a similar issue... |
The "SOLUTION" I am sorry, do not beat me with sticks, I know NOTHING. ...but it works. Ok...Here is how to 'fix' this... Install a WORD PRESS instance without the database... or without any of the files for that matter. WP/SteveLTN/NGINX has magic that makes PHP execute in WP containers. If anyone could just extract that gem, that would be nice. Relevant bits of the docker-compose.yml
Note: The only change is that the 'static' site is now pointing into another Wordpress container (WP0)
Note: There is no database link, no environmentals for this WP instance, indeed NOTHING but the image that it draws down. Step 1. Step 2. Step 3. The only file you care about is your index.php file. Now you can play with HTML/PHP as you otherwise would. Please forgive me, this hack is born out of my ignorance of pretty much all the systems involved in this... but it works. If someone has a more elegant way to do this. Please advise. |
Edit: "Solution" in the post below.
Note: It works, its ugly and not artful at all, I would LOVE if someone who has NGINX expertise above mine (i.e. Banging the files together until sparks fly) could fix this the proper way.
First let me say how happy I have been with SteveLTN/https-portal docker deployment.
Such a time saver for such a newb as me.
I have set up a couple websites (One WordPress and One Static). Everything works, including certs.
PROBLEM:
When I access https://stat.mysite.com/index.php - The file downloads rather than executes.
This is on the static website.
The Wordpress (Which uses PHP) operates ok.
I have done some research and it appears that there are some configurations necessary in "/etc/nginx/sites-available/mydomain.com.conf" AFAIK?
Q1: What is the best way to affect those configuration changes (so I can execute https://stat.mysite.com/index.php rather than download it)
Q2: If I use the changes to "/etc/nginx/sites-available/mydomain.com.conf" approach, can I selectively replace only the section that deals with .php? To be honest. I could not replace the entire .conf as I have no idea how to drive NGINX (I only used apache and that was in a very basic way).
AFAIK: This is the section in .conf that makes the .php execute
The relevant parts of my docker-compose.yml are as follows;
I would appreciate some insight into this. This is for a community website.
The text was updated successfully, but these errors were encountered: