Deploying to was with Docker, using Nginx, Browser --> Not found, the requested resource was not found on this server - docker

I am new to this and I am following this tutorial https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/#static-files . It is teaching me how to Dockerize my Django app.
I have just tried to use Nginx. My containers are up. However,when I try to view my app on safari. It tells me that the requested resource was not found on this server. I think it has something to do with my ports. I am not sure. This is my code below. Thank you for any help you can give.

Check your DEBUG status, sometimes if DEBUG=0 in your enviroments variables testing show that error. Thats because Django cant load the welcome page for example in production.

Related

I can not open the url of the site deployed with dokku

Hello everybody) I started learning dokku. Going through the tutorial from the documentation for the Heroku Ruby on Rails "Getting Started" app I can't go to url generated by dokku in the browser. I am only using my local machine while learning and doing git push to localhost. This command works without errors, the container works, I get the url to the site, but I cannot open it in the browser. The same problem appears with another project, when I try to deploy a python django project, this is just a project skeleton created by django, without my code. It must show a welcome page and I want to see it when the site is running on dokku but I cannot go to the url. I tried to use dokku domains and dokku proxy but couldn't solve the problem. Please help me figure out how to fix this. I'm new to dokku, docker, nginx and deployment so the problem can be trivial. I'm also want to know on which ip, port dokku runs the sites and on which ip do I need to run the wsgi server inside the container?

When running "rails server" why does my localhost refuse to connect on both Chrome and Firefox?

I'm trying to see my Ruby on Rails app on my localhost, when I run rails server it looks like it is running good with no errors but when I open up my localhost at http://localhost:3000/ it redirects me to https://localhost:8080/ and says refuses to connect. I am able to open my localhost files with no problems but when I run rails server and open localhost with the port it redirects me to https instead of http no matter what I do. I even tried running with different ports. I am on Ubuntu and my app is using Puma.
I have done the following so far:
Cleared all my cache & history
Opened incognito window
Ran rails server with different ports
Changed some about:config settings to false in firefox
Have searched localhost in 'chrome://net-internals/#hstsand' but says not found
I've tried the other solutions on this link: Google Chrome redirecting localhost to https
None have worked at all. What could the problem be?
I get this error on Chrome
And this error on Firefox
Any advice on this helps! Thanks.
EDIT: Let me know if this needs to be changed, this is how I have my
etc/host/ set up
After scrolling through posts and much research my issue was that I did not run yarn before running rails server. I found this post and referred to this answer https://stackoverflow.com/a/58369306/14365156
But I did not follow those steps exactly, I only ran yarn then ran rails server and now am finally able to view http://localhost:3000/. Hopefully this helps others!

How to access phpmyadmin on DDEV Windows 10 pro localhost with SSL record too long error

I am using DDEv and Docker with Windows 10 pro to set up a localhost install of drupal 8.8 using Composer. I have set up and configured the local drupal installation (it is a fresh install) and it appears to be running correctly, but in the admin section of the drupal site I receive a warning to change write permissions of sites/default/settings.php.
I tried to change settings using Filezilla, but it appears that local files in Filezilla do not provide access to write permissions? When I right-click the file in Filezilla, no permissions option appears.
Following troubleshooting tips from ddev, I tried to access phpmyadmin at https://mysitename.ddev.site:8036
Instead of loading phpmyadmin, I got the following error message:
Secure Connection Failed
An error occurred during a connection to dmckimep.ddev.site:8036. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
I've been searching around for a couple of hours now and do not find a solution to this. I ran ddev describe and all seems fine with the installation. The drupal site in the container seems to run okay. There are no port conflicts present so far as I have found, so I am not sure why I cannot get access to phpmyadmin.
I am a relative newbie in terms of skills, but have successfully maintained drupal 4-7 on localhost with XAMPP and my web host. Now I am wrestling with the move to drupal 8/composer/docker/ddev. Any suggestions would be much appreciated.
Thank you!
Update 2022-09-14: DDEV has had https support fpr PHPMyAdmin and MailHog for years now, ddev describe will show you the URL.
(Original answer) ddev's PHPMyAdmin connection doesn't support https, just http. You can find the links for both PHPMyAdmin and MailHog using ddev describe; both are http-only, as in your example, http://mysitename.ddev.site:8036. It would be possible to provide https URLs for PHPMyAdmin and MailHog, but nobody has ever asked for them, and there's no security reason to do so.
Note that the key reason for https on the actual project URL is because real projects run behind https and people need to see problems like mixed content during the development phase. But there's no such need for PHPMyAdmin. However, I'm sure if people ever want it, we'll do it, it's not hard to do.
Just as a general add on, after ddev start you can run ddev launch -p in order to open PHPMyAdmin for the current project database in the browser.

access var/www folder on ubuntu 14.04 vps

I recently installed apache and php on a ubuntu vps and i'd like to be able to make web requests from an iPhone app to php files on the server namely files inside the www folder ex:'var/www/myfolder/echo.php' by ways of a web request from the app to the URL 'http://ipaddress/myfolder/echo.php' or whatever the correct url is. I do not know the URL i need to type in to access the echo.php file. can anybody shed some light on this confusing situation I'm in?
ps. this is my first time working with servers
You need to check what your DocumentRoot is set to in your Apache configuration.
So if /var/www is the DocumentRoot, which is the default on Ubuntu, then your URL will be http://machinename/myfolder/echo.php, which is what you have.
Before doing any coding on the iPhone, test the .php file in a web browser.
Any errors during development and testing, then check the Apache error log (/var/log/apache/error.log).
consult https://stackoverflow.com/a/23175981/2038460
solved my problem! i just had to specify the document root to actually be the folder i was working on, i though it'd be enough just having it at/var/www but apparently not, had to be /var/www/folder

Error when trying to open my localhost

Hello guys
i have installed wamp server Version 2.0 .. and i have tried some things and every thing ok ..
i have reboot my Desktop then some thing goes wrong when i am trying to open my local host
EMDAEMON
HTTP/1.1 404 , Not Found
should i consider re-installation ??
Reboot desktop? Open your local host? If you want to do web development you should get familiar with basic computer terminology, at least to a point when you are able to make questions that make a minimum sense.
I'll assume you have installed a bundle that includes the Apache web server and you want to configure a virtual host that's served when you load http://emdaemon in your web browser. The exact details to do so vary slightly depending on your platform. Being a newbie, I suggest you reuse the main site that's already configured and can be loaded through http://localhost. It's roughly explained at http://www.wampserver.com/en/presentation.php. Leave multiples sites for the future :)
Solved .... it seems that we have conflicts in ports ..change port in apache make it works

Resources