flask app with subdomain on openshift - subdomain

I created python flask app, and deployed to openshift. It can be accessed at
https://ledgerware-hj.rhcloud.com
Now I'd like to use subdomain names for language code. On my local pc I added the following line to C:\Windows\System32\drivers\etc\hosts file:
127.0.0.1 ledgerware.dev
127.0.0.1 en.ledgerware.dev
I also configured flask app:
SERVER_NAME = 'ledgerware.dev:5000'
Everything works if I browse to http://en.ledgerware.dev:5000.
For openshift I configured flask app to be:
SERVER_NAME = 'ledgerware-hj.rhcloud.com'
But, https://en.ledgerware-hj.rhcloud.com won't work, because there must be other settings to be done. What else should I do to make it work?

Here's a blog related to your issue that has some suggestions:
https://www.openshift.com/blogs/custom-url-names-for-your-paas-applications-host-forwarding-and-cnames-the-openshift-way
Can you please take a look at it and see if it helps?

Related

how to setup phpmyadmin on nginx with laraval?

does anybody know how to setup phpmyadmin on nginx server (ubuntu) with laravel?..
my site is built with laravel and hosted on /var/www/mysite/
the default nginx-config is disabled...site is not hosted under the default html directory, but on the /var/www/mysite directory...(because i plan to host one more site on the same server in future)
Laraval installation works, but i am unable to access phpmyadmin..
i have already tried the ln -s /usr/share/phpmyadmin /var/www/mysite/ approach but laravel gives a 404 error
the guides found on the internet do not specify how to install phpmyadmin onto a nginx-laravel combo.. the settings are different than a normal nginx only installation..
does anybody know the correct steps to make it working?
Your question is not about use specifically phpmyadmin, but how to use more than one site under the same host with nginx, it doesn't matter if it is phpmyadmin. If you already have your website at /var/www/mysite you cannot map the phpmyadmin to the same path (symlink), you have to map it to another folder, like this:
ln -s /usr/share/phpmyadmin /var/www/phpmyadmin/
Make sure that your .conf files at nginx are right, post them here.
Remember to reload the server and it could be the case to map the public phpmyadmin folder (that contains index file) if it exists.
Check it out: https://fedingo.com/how-to-host-multiple-domains-on-one-server-in-nginx/
English isn't my first language, ask me again if you didn't understand something.

Make served Jekyll project accessible within local network

I'm creating a website locally with Jekyll from my desktop Linux. It's connected to the same router as my other devices, I would like to test the site directly from my android but it's inaccessible.
I also tried to serve the _site directory with darkhttpd and it works, I can access it from android. Is there a way to do that with only Jekyll?
You can do this by starting the server with this:
bundle exec jekyll serve --host 0.0.0.0
You can then access the site locally by going to the servers IP and port 4000. It might look similar to this:
http://192.168.1.100:4000
Source: https://zarino.co.uk/post/jekyll-local-network/

execute index.html on internet access to server

I'm running Apache on Ubuntu 14.04. I'm Port Forwarding 8080 to my server. I've edited ports.conf to Listen 8080. I have an index.html in /var/www/html. when I browse to MyURL:8080 I get An Index of / that shows html as a directory.
If I click the html directory icon, my index.html executes. I looked at /etc/apache2/sites-available/default-ssl.conf and 000-default.conf, they both show DocumentRoot /var/www/html. So does sites-enabled/000-default.conf.
Any help on what to try next to get the index.html to execute on entry to the server would be appreciated.
I'm by no means an expert on ubuntu's apache configuration, but through some quick searching I found this http://www.ajopaul.com/2010/05/01/ubuntu-apache2-change-default-documentroot-varwww/
Is it necessary to have a trailing "/" on the document root path?

Openshift application got error

I was created a PHP 5.4 application with Web load balancer and mysql 5.5 support on openshift free plan. My problem is when I login into my app via SSH delete the index.php file in app-root/runtime/repo folder (Openshift web folder) and create new test.txt file, my application doesnt show test.txt file. It still shows Openshift welcome page when I access my application.Then I delete test.txt file. The app-root/runtime/repo folder is empty. I tried create new file name 'blahblah' in runtime folder and access but still nothing, only 404 page. However, restart the application doesn't resolve the problem! The problem only happend when I add 'Web Load Balancer'. Without load balancer, my PHP app working normaly event I delete index.php file
When you use the "Web Load Balancer", it runs in front of your application and monitors which of your web servers are up and running. You can visit http://app-domain.rhcloud.com/haproxy-status to view the status of your backend servers. If nothing responds at the root context (/) of your application on the web servers, the haproxy thinks it is down and takes it out of rotation. You have to have something (even a blank index.php or index.html) page so that the haproxy will get a status 200, or change the url that is monitored in the haproxy.cfg file on your main gear.

AWS page just showing Apache Start page and not html file

I'm running an apache server on an Amazon EC2 basic linux instance, and I'm trying to get it to just display a simple test html file that I created. The file is in /home/ec2-user/public_html (just for test purposes). I've changed the DocumentRoot and Directory to point to this directory, but the public dns address is still just showing the default Apache start page. What else do I need to do/change to get this to actually display online?
Edit: I've also uncommented the VirtualHost *:80 line, changed the DocumentRoot and ServerName within the VirtualHost tags.
It turns out I had forgotten to change some permissions on the test.html file itself and that was causing a holdup.
check running instance's security group HTTP rule. ADD rule if not added:
Select HTTP from the Type list, and leave the source as Anywhere (0.0.0.0/0).