I've set up my ec2 instance, uploaded a test php file to var/www/html and updated the httpd.conf file successfully as mentioned in blogs/documentation.
Now I want to view my php file in my browser. I am trying to open my Public DNS in web browser but the browser cannot open it. Google chrome says:
Oops! Google Chrome could not connect to ec2-54-218-xxx-xx.us-west-2.compute.amazonaws.com
Did I miss something?
Once you get into the server through terminal, I modified this file httpd.conf by terminal command "sudo vi /etc/httpd/conf/httpd.conf" by uncommenting VirtualHost in the last few lines of the document (it is a really long document).
Under VirtualHost I also uncommented the DocumentRoot and changed its field to /var/www/html/ Now I can access this php file from the web browser by this url "myPublicDNSFromElasticIP"+/myPHPfileName. (YOU have to transfer your php file to /var/www/html/HERE in order to display it in the web or gain access from your mobile applications. You can do this by scp command in terminal)
You need to make a new PublicDNS by going into Elastic IP in the amazon Web EC2 console. so this myPublicDNSFromElasticIP is that new Public DNS from Elastic IP.
Also after you modify the file httpd.conf, you need to restart httpd I used this command in the terminal.
sudo /etc/init.d/httpd restart
And of course you need to download php from terminal using command sudo yum install php in order to get php to work
I used two websites. First website was a bit more helpful but the second from Adil was also helpful
http://www.alexkorn.com/blog/2011/03/getting-php-mysql-running-amazon-ec2/
http://www.rndmr.com/amazon-aws-ec2-easy-web-serverset-up-guide-with-a-mac-and-coda-2-256/
Related
I have installed Jenkins and Apache to one instance of CentOS in aws. I have connected Jenkins with github but I am not able to access the application through url as it shows the following error.
You should add your website content to the directory /var/www/html/.
I need to copy files from jenkins directory to the mentioned one can you please help me how to copy app so that I can use it on browser.
I have been trying to install Beaker server on Fedora 26 following the instructions in https://beaker-project.org/docs/admin-guide/installation.html#installing-the-beaker-server.I've done setting up Beaker database and enabling beakerd scheduler, but I'm stuck when I come to the step of configuring the URL for beaker server on Apache (as provided in the link and the image).the instruction i'm stuck on
I'm not sure what is the URL of my Beaker server (where to find it in the config file?). Should I config that URL in /etc/httpd/conf/httpd.conf or /etc/httpd/conf.d/beaker-server.conf? I gave a try on both but all I can manage is displaying the index.html file of the server, not the Beaker server UI as expected. I configured the server name to be the IP of the server since I want to test first before contacting the DNS provider.
Thank you for your help on the matter.
The default /etc/httpd/conf.d/beaker-server.conf file configures the Beaker web application to be served under the path /bkr/. That's this line (and all the related settings):
WSGIScriptAlias /bkr/ /usr/share/bkr/beaker-server.wsgi/bkr/
So you should find Beaker accessible at http://$YOURSERVER/bkr/. That's what the documentation means when it says "the URL configured in Apache".
If you just visit http://$YOURSERVER/ you will indeed see the Apache welcome page because nothing else is configured to be served at the root.
I am currently using Amazon Lighsail for my Wordpress site. I have a fresh Wordpress install on my Lightsail account but would like to upload my old mysql tables from my current site to phpmyadmin.
I have ssh-ed into the terminal and have done cd apps/phpmyadmin/ but I am not seeing my wp_ tables that I need to replace. How do I access this?
I tried the following command to do ssh port forwarding but it didnt work:
ssh bitnami#xx.xxx.xx.xxx -R 8080:127.0.0.1:80 (with the x's being real numbers)
Any idea on how I can upload my current .sql.zip file to Wordpress AWS Lighsail using SSH?
Thanks in advance!
I have deployed Keycloak-Server (as a Wildfly Swarm fraction) to the Swisscom Cloud Foundry environment (with a Java build pack).
When I try to access the Keycloak admin console I get the following error:
"You need local access to create the initial admin user. Open http://localhost:8080/auth or use the add-user-keycloak script."
How could I resolve this?
Can I somehow open an ssh tunnel to my Java buildpack app in order to access it with http://localhost:8080?
I also tried to "cf login" and "cf ssh" into my app. I created the "add-user-kecloak.sh" by copy/pasting it. When I try to execute it I get the error "java command not found"?
This is the script: https://github.com/keycloak/keycloak/blob/master/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/add-user-keycloak.sh
You can use cf ssh to open an ssh tunnel into your container and access a URL within: cf ssh your-app -N -L 8080:localhost:8080.
This will listen to port 8080 on your machine, and forward any requests to it to port 8080 on your app container. So you should be able to point your browser to http://localhost:8080/auth to get to the console.
Running the script may be a bit more complicated; at least the Java Buildpack has not standardized where it stores the java executable and it's not added to the PATH when you cf ssh into the container, so you'd first need to find it.
I have not used Keycloak myself so my answer is limited to how to tunnel into your app container to access a local console.
Either way, note that if this admin user is saved to local disk, and not to some external storage, next time the app is restaged (either by you or by the system to apply patches to its rootfs), you may need to go through this again.
I am brand new to web app development and thought I would try django as I am familiar with python. I followed the following guide: http://www.lennu.net/2012/05/14/django-deployement-installation-to-ubuntu-12-dot-04-server/ to deploy a django page to the letter. However, I now realize that this guide was for the server version of the OD and i'm running the desktop version. When I try to open my site in chrome (amitash.r) it fails with a page not found. Now when I open localhost, I get an internal server 500 error. All my config files are exactly as stated in the guide. Any fixes?
Can you post your mod_wsgi script and Apache VirtualHost file?
Following the instructions from the link you gave, the mod_wsgi script should be in:
/srv/my_project/app/conf/apache/django.wsgi
The VirtualHost file location from the link should be:
/etc/apache2/sites-available/DOMAIN
Make sure you enabled your site. If you named your file DOMAIN, like the instructions, you should enable the site using:
a2ensite DOMAIN