The commande $ symfony server:ca:install have break my connexion to my localhost - console-application

While launching my symfony server (version 6) I read that the command $ symfony server:ca:install was required to have a TLS connection.
In the browser my symfony project displays a "Not Found" error instead of the server page. I attempted $ symfony server:ca:install --renew to uninstall it but now all browsers (Edge and Chrome) tells me that my localhost is not secured.
How can I fix this?

Related

Browser error during django + SSL connection with local server

I have a problem during adding facebook login button to my website at localhost.
I've already add mysite.com to hosts file and installed django-extensions, werkzeug, pyOpenSSL. By running command python manage.py runserver_plus --cert-file cert.crt my own-made sertificate was created. I imported this certificate to Trusted Chrome sertificates but safe connection doesn't establish. When i pass https://example.com:8000/account/login/ I hit an error NET::ERR_CERT_COMMON_NAME_INVALID,
Failed to confirm that this is the server example.com. Its safety certificate refers to *. The server may be configured incorrectly or someone is trying to intercept your data.
Please help me to solve this.

Can't connect to Flask-Socketio via wss but works via ws

I have built a Flask-Socketio server application which works as expected when I connect to it using a javascript client via ws, but fails to connect via wss, both on localhost and when running on my Digital Ocean server. With wss, I get this error in the console (client running on Heroku):
index.js:14 WebSocket connection to 'wss://[IP_ADDRESS]/socket.io/?
EIO=3&transport=websocket' failed: Error in connection establishment:
net::ERR_CONNECTION_REFUSED
When the client is running on localhost, it causes this error:
polling-xhr.js:265 GET https://localhost:5000/socket.io/?
EIO=3&transport=polling&t=MW6p0Aj net::ERR_SSL_PROTOCOL_ERROR
The flask server is running with
socketio.run(app, host='0.0.0.0', port=443) # production
or
socketio.run(app, host="localhost", port=5000) # localhost
At first I thought it could have been an issue with the Nginx configuration or server ports not being open, however the same issue occurs with the server running on Localhost, so now I'm suspecting an issue with my Flask-Socketio application
Turns out I didn't have SSL certificates configured. I followed the instructions in this guide to create a self-signed SSL certificate and configure Nginx to use it. Now works as expected.
There are lot of issues with Flask-Socketio. With Apache server it almost doesn't works.But you are using Nginx. Refer following link on github.
https://github.com/miguelgrinberg/Flask-SocketIO/issues/298#issuecomment-408682588

How can I verify if TLS end-to-end encryption is configured properly?

I just tried to set up TLS on a django app hosted by Heroku PaaS. How can I verify if TLS was configured properly and that the communication is encrypted?
I tried:
curl -vI https://www.example.com
but I cannot tell if it is properly configured.
I tried:
heroku certs:info --app Appname
and it says
appname has no SSL certificates
If not set up properly but if I go to the url using chrome, I get the padlock symbol followed by 'secure'. What is going on? xD

http://127.0.0.1:8000/ isn't working on Chrome but working fine on Internet Explorer

I've recently installed django on Windows Server 2012 R2.
When I run python manage.py runserver it tell mes to use http://127.0.0.1:8000/ . Its working on Internet explorer but in Firefox and Chrome I get the following error.
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: http://127.0.0.1:8000/
Connection to 127.0.0.1 failed.
The system returned: (111) Connection refused
The remote host or network may be down. Please try the request again.
Your cache administrator is administrator.
Bypass proxy wasn't enabled. It worked after enabling.

Error: That IP address can't be assigned-to in Django?

I am running Debian 6 stable and I am trying to run Django locally using ./manage.py runserver command. This is what I get:
Validating models...
0 errors found
Django version 1.4.1, using settings 'genelaytics.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That IP address can't be assigned-to.
I tried creating a new django project, still get the same error. What's the problem? I just fresh re-installed Debian yesterday because of this problem. This problem hasn't gone away. How can I fix it?
That's not related to Django but to your network configuraton. The very basic loopback interface is not working properly. If you want to learn more about networking and this layer.
Your problem is that your host cannot ping to itself, and so Django gets an error when getting the network address. That's in django/core/management/commands/runserver.py and is returned when it gets the system error 99 (EADDRNOTAVAIL).
Your network configuration at /etc/network/interfaces should have this piece at the beginning:
# The loopback network interface
auto lo
iface lo inet loopback
Check Debian documentation for full network configuration.
You are missing two lines of code in network configuration file. Edit the file as a root user with any text editor:
sudo gedit /etc/network/interfaces
Add these two lines:
auto lo
iface lo inet loopback
Restart the network using the following command:
sudo /etc/init.d/networking restart
Now, the localserver will work fine.