Restrict access to public website until it's ready to launch? [closed] - django

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've built a Django social media-type website that will run on a Debian server using Apache. I'd like to deploy the site to my production server but restrict access so that only I can see the site while I'm checking that everything is working properly. What are some good ways to restrict access? Do you put up a front page that requires a password before getting to the actual site homepage itself? Or perhaps create a special firewall rule?
Also, what if you have two separate and distinct public websites that will be hosted on the same server? Does that change your options?

You can redirect all IP's to a static page (under construction) and just allow your IP to access the site. Below is the code which you need to put in .htaccess or in httpd.conf:
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^1\.1\.1\.1 # where 1.1.1.1 is your IP
RewriteCond %{REQUEST_URI} !^/under_construction\.html$
RewriteRule ^(.*)$ http://my-site.com/under_construction.html [R=307,L]
Put under_construction.html somewhere in your project templates and define an Alias to serve this template in apache.

This is all about your front-end webserver (Apache, Nginx or whatever) configuration. The usual solution is to password-protect your site (using basic HTTP auth), which let you test it from anywhere and let other selected peoples preview it too. And the number of site hosted on the server is totally irrelevant.
Web sites / applications / servers configuration and maintainance is a job on it's own FWIW, and there's a whole dedicated Q&A site here : https://serverfault.com/

Related

How to set up port forwarding on router to access local web server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How do I set up port forwarding on my router so that I can access a local webserver outside the LAN network?
I have a local python flask application running at the following URL on a RaspberryPi, which is only accessible when on the same LAN at the following url:
192.168.1.11:5000
I'm trying to set up port forwarding on my NETGEAR Nighthawk M1 Mobile Hotspot Router by entering the following into the router form for Port Forwarding. My Public IP is 107.77.241.11 so I tried the following to no avail.
I also tried the following based on this question, which also did not work
How can I access my python flask app with port forwarding?
In my case i had to specify local details, not the public ip in case of urls
don't choose port 80, it might be blocked by another service, 5000 works ok
did you add host='0.0.0.0' in your Flask app?

Possible to host a django site on github pages? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm new to django, and have a small finished project I'd like to publish online. Is it possible to host my site as a github project page, or do I have to use a service like OpenShift?
You can deploy Django on a physical server or VPS (see the deployment docs). You don't have to use a a platform as a service like OpenShift or Heroku.
It is not possible to host a Django site on Github pages. Github pages is for static sites, whereas Django requires Python to generate pages dynamically.
If you do not want to use OpenShift, but instead would prefer a more python-centric environment, I just discovered PythonAnywhere today. They appear to allow you to host Django websites and you can even use it for the Django tutorial.
Honestly, that may depend on whether you can make a static site using django, because GitHub will work for you if you have a static site.

Access to Liferay [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have installed Liferay on the AWS server and integrated with Amazon S3. I am able to access Liferay on the server by giving localhost:8080 but I am not able to access it from my laptop by giving Hostname:8080(Public IP is not static). Can anyone tell me why I am not able to access Liferay from my laptop. Is there any other steps to follow?
If you want to access your server with hostname, you have to front your Liferay app server with http server (apache web server).
Add following into portal-ext.properties file
web.server.http.port=80
Go to LR control panel -> site -> Site-setting -> Site URL -> Virtual Host. Set your virtual host here. e.g. www.abc.com
install apache web server, if you haven't.
Add following into apache's 000-default.conf file
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
restart apache.
pass host entry on your local system.
there you go.... it's done, you don't event need to access with port 8080 either.
Hope it'll help.

Connecting ColdFusion to CDN [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm just wondering whether anyone out there has managed to connect up a ColdFusion based CMS to a CDN for content hosted within it ?
We currently have our own CMS and we make use of CKEditor and CKFinder to display content. However, we are noticing that it might benefit from taking advantage of a CDN for static content.
What I'm wondering is how does one go about connecting a CMS to a CDN? All I've been able to find is articles on using existing wordpress modules for connecting content for websites.
Any info would be greatly appreciated.
You don't need to connect a CMS to a CDN that is not how CDNs work.
Let's say your assets are served on assets.mydomain.com to utilise a CDN you create an account with one and register a CName pointing at the CDNs servers let's say that is static.mydomain.com. On the CDN you configure assets.mydomain.com to be the origin for static.mydomain.com.
Now you reference all your assets in the HTML of your website using static.mydomain.com. This is where the CDN does its clever bit. When an asset is requested the CDN checks to see if it has it, if not it requests it from the origin and simultaneously caches it so the next time you are asked for that asset it returns it from the CDN cache.
So really to connect your CMS to the CDN as you ask is achieved by making sure that the assets are requested off of a domain you have configured as above.

A good static file server as a service [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for an easy to use static file service that I can use with my application server. I'm using Django and just need a simple service that let's me host static files that I can call from my templates.
It would be best if the service had an easy way to secure certain files and had a way to easily integrate that secure file sending.
I could just use a webserver I have, but I'm currently testing Heroku and it doesn't host static files. I'd use my other webservers, but I'm looking for something that can handle the secure files better then just an ngix server. I'm not a great admin so I was hoping for a easy-to-use API based or something static server host.
Essentially I want to do what is described in here: http://forum.slicehost.com/comments.php?DiscussionID=1929
But from a server that is not "local" to the application server, like http://wiki.nginx.org/NginxXSendfile that requires.
Well that depends on what you need. Are you looking for a CDN, then go to google and search CDN and spend a few hours picking one out. If you're looking to store user uploaded files perhaps try S3.
If your looking for how to deal with this in django. Well then that's what the STATIC_URL (or MEDIA_URL) setting handles for you (as well as the {{ MEDIA_URL }} idiom is for in templates (replaced by staticfiles in django 1.3)