I used Django + nginx + uWSGI to deploy a website to example.com (this is also the hostname of my instance where I put the Django app on Google Cloud Platform) following the instructions here https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html.
Now here's the strange thing. I found that all devices under my university's WiFi can access my website (http://example.com) but devices outside my network (for example, in another city) cannot access it. Does anyone know what is going on here?
Thank you very much in advance.
Found out where the problem was with the help of my friend.
Turned out I pointed my DNS to two ip addresses and this caused the problem. When people at other places visit my website, they were directed to the other ip which only showed them the nginx welcome page.
Learned a useful command 'ping www.example.com', this helps you identify the ip address associated with www.example.com
Related
What is the best practice or tutorial to set up a droplet to showcase my React/Express and Django fullstack projects on a single server?
I've found NGINX server blocks, but not sure if I'm going in the right direction.
I want users to go to a React site that will have links to several other React or Django projects running on the same server.
Finally figured it all out.
You can use all of the regular server block documentation if you have another domain name or subdomain name you want to point to the server. That documentation can be found at Nginx Documentation on Server Blocks and Digital Ocean post on server blocks
If you want to make multiple server blocks within subdirectories of the root server you can use location as seen here in the Nginx documentation: ServerFault question/answer
I am posing this questions since I didn't found anything that would already solve my little problem. I want to know if I can see requests over the internet on my IDE Pycharm or any other. Normally when I hosted site via localhost I saw requests I did, and I was also able to see printed suff. Now when I implemented WSGI, maping external IP to free hostname I don't see live requests anymore (all is hosted locally on windows with xampp apache2).
As i have installed WAMP developer Pro recently and i have solved everything that it needed but the main problem is coming which is most important , i am unable to put my website online as i have made a url from WAMP developer and i have putted my all website file in it it is working fine in my as i type www.radharamnji.com it comes but other can not see it so please tell me how i can make it online so everyone can see it.
here is a pic of WAMP developer
If You Have A Website and domain You Have To Upload All Of Your Files To Host Public_html Folder.
If You Want to change your computer to a server you have to buy a valid IP and set dns settings and ...
If You Upload Your Files On The Internet YOu Have Too Change Your Adrress to Relative.
For Example Change The Adrress Of Picture From (http:/localhost/img/img1.jpg) To (img/img1.jpg).
The WAMP you are using has a guide for this located on its site's /howto section: "Enabling Online and Internet Access of Websites...".
Chances are:
Your Windows Firewall (and also anti-virus s/w such as McAfee) are blocking incoming port 80 and 443 TCP connections, and the httpd.exe process.
Your Router does not have any port-forwarding set up for WAN:80 to LAN:80.
I'm sorry for being dumb, but I am really stuck for few days. This is my first time using AWS. I have successfully installed LAMP web server under t1.micro on my customer's AWS account http://54.72.132.215/ following this tutorial . But I don't know what to do next after the installation. My goal is:
Setup a Domain
Run a Prestashop.
I hope you can guide me to the right path, I am totally lost. Thanks.
You need to register a domain with someone, this is outside of Amazon. Just google domain name registrars:
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=domain%20name%20registrar
Then you'll need to point your domain to your Amazon EC2 instance. I would suggest using Route 53 to do this, another Amazon AWS service that makes it easier to setup and control your domains:
http://aws.amazon.com/route53/
Once you have that setup, visiting your name domain should show the default apache It works! page, if you've correctly setup your LAMP server. It'll look something like these:
https://www.google.co.uk/search?q=default+apache+web+page&espv=2&source=lnms&tbm=isch&sa=X&ei=yRfWU_v8OeHe7Abp1ICICw&ved=0CAYQ_AUoAQ&biw=1457&bih=881#imgdii=_
You'll want to add a new vhost for your new PrestaShop site, this will allow you to setup a specific set of files to serve for your new URL, and means you can add other sites to the server later on. Just a quick google shows multiple tutorials on doing this, here's one of them:
http://calebogden.com/multiple-websites-amazon-ec2-linux-virtual-hosts/
Then follow the tutorial in the PrestaShop documentation about installing PrestaShop via the command line:
http://doc.prestashop.com/display/PS16/Installing+PrestaShop+using+the+command-line+script
Now I'm guessing that all those steps in one go is a little overwhelming, so I would suggest you break this task down into chunks and work on them one at a time, and post a few different questions on StackOverflow and probably ServerFault: https://serverfault.com/, as that is better suited to setting up servers.
To summarise you need to:
register a domain name and point it to your EC2 server, you should see the default apache page
create a new vhost to server web pages for your new domain
follow the guide on PrestaShop about installing the software
Treat each of those a separate task. This question covers lots of topics in one very general idea, the full answer to your problem wouldn't really fit in a single post.
ServerFault will probably have a lot of your answers already, regarding setting up domains and vhosts at least.
I have set up a server for our Django web application so that everyone in our LAN can access them. I have installed Ubuntu 12.04 with apache version 2.2.22 and modpython version 3.3.1. In some of our systems in the LAN, the server is not accessible through url as well as ssh while in some others it is accessible sometimes. As we are connecting remotely to the system, this is causing a lot of problems.Kindly help me in solving this issue.
Thanks in advance.
This type of question is super hard to answer because the possibilities are almost endless. However, from what you're saying, if some machines CAN access the server and SOME can't, the problem is related to networking, and not the server software (or Django).
Though it could be related to either if you have some weird access rules setup that you're not mentioning in your response.
So, a few things to verify:
Can the machines which cannot access the application via HTTP ping the server they reside on by its IP address? If they can't, you have a networking issue. Could be a routing problem, could be a firewall issue.
To see if it's a routing problem, do a traceroute from one of the machines that cannot access your server, and see what happens. Did the traceroute stop at a particular router on your network? Well, then that's probably an issue.
To see if it's a firewall issue, try changing the IP address of one of the machines that can't access the server to one of the machines who can. Did it work? OK, you have a firewall problem.