PHP pages not showing in AWS Elastic Beanstalk - php

So I'm trying to deploy my first application on AWS Elastic Beanstalk, but I'm having some issues.
When I try to go to my php pages, a blank page is pulled up in the web browser. However all the html pages on my app are pulling fine (although they aren't styled). Anyone have any ideas why that is?
FYI: I'm not sure if I am connecting to my database instance on RDS correctly.

You need to pinpoint the issue via the logs. Go to your Elastic Beanstalk console and request the full logs. Once you got this zip you'll probably find an error in the directory-hooks-executor.log file (or any other file).

Sorry I figured it out! I didn't know that URL's past the top level domain were case-sensitive for Linux. I had one letter that wasn't the correct capitalization on my files.

Related

After deploying wordpress project to server not loading wordpress

I am working on a WordPress project, the job is to deploy everything from the old server to the new server.
So I downloaded everything from the old server.
I deployed a WordPress project to paid hosting, I deployed manually by pushing all the public_html folder to the server.
First, without a database connection, it was showing me a database connection error but after the database connection, it is showing me a hosting page instead of my WordPress project page.
How can I fix it and is there a configuration that needs to be fixed?
Kindly guide me and help me in this matter.
Also is it a domain configuration issue?
The domain is configuration is on the old server and I didn't set it up for the new server yet.
Thanks.
I faced similar issues yesteday when i tried to move my woocommerce exercise from localhost to my domain(live hosting),broken all links,images,routes etc ...There is no way to fix all that whithout paid plugins, maybe someone can go through whole db and change URL-s,i cant,and after that, the question remains whether I have problems elsewhere in the local WP code,who know where in code i also have embed "localhost" URL.
I cant give you solution but i must share my frustration with this tehnology which doesnt allow normall development process like 1)development -> 2)testing -> 3)deployment .

How to setup Laravel application in AWS Elastic Beanstalk using external RDS database

I want to start deploying my laravel app to production. To avoid changing AWS config in the near future, I decided to try to add continuous integration. To do this I'm using elastic beanstalk and pushing the code there using another AWS tool. All this is working perfectly. I put a test message in /public/index.php to output "hello world" and it works as expected when going to the URL. When I remove this text and run my laravel app as normal, I get a 500 internal server error. I'm not sure all what elastic beanstalk does on deployment for laravel apps. Because of this I'm not sure if this error is occurring from a bad DB connection or laravel app not fully setup yet.
I created an RDS DB instance outside of elastic beanstalk. I am able to access this from sequel pro and I added the database I will use to store all my data. I added all the necessary db connection values (host, port, database, username, password) to /config/database.php and the elastic beanstalk server configuration environment variables.
I've searched online for days for info but haven't found anything specific to this. Also part of my issue is a lack of understanding of how laravel is setup during a deployment in beanstalk. Is there something with /.ebextensions that will help me accomplish these goals?
When I deploy my code I need to make sure all vendor files are installed through composer and then I also need to make sure all database migrations/changes happen. I want to automate as many steps as possible so I can just push up code changes and server will change code and keep working.
I also want to make sure there isn't anything I'm missing for setting up my db connection. Are there any other files in laravel I need to setup or something in elastic beanstalk I need to have configured? I'm keeping my db open to all connections and then I can tighten restrictions later
EDIT: My database may not be configured correctly yet, but that appers to not be source of the issue. I think my issue is knowing what scripts and how to run them during deployment. I want to make sure composer and php artisan migrate is ran to keep everything up to date. How can I do this with elastic beanstalk?
This is a little off topic but with my experience I do not recommend using beanstalk to achieve a good workflow pushing and deploying. I recommend
you to use Forgelaravel.com to deploy your GitHub repository. In forge Laravel you will be able to create a server from AWS and it will automatically create database connections and stuffs, then with just one click you can deploy to the server and keep a good workflow.
Given that we're speaking of a Laravel application, this 500 Server Error
often occurs when one is creating new infrastructure. Why? It's likely to forget to add the environment variables to the EB environment.
Simply go to that EB environment configuration, then under software modify to include at least the following environment properties
APP_DEBUG (can be, for example, false)
APP_KEY (this is the key generated with php artisan key:generate)
APP_NAME (tiagoPeres)
Then the issue will be gone.

Hosting website in XAMPP failed

I have a website which uses AngularJS 1.5.x as front end and PHP as back end. I want to host that on my local machine. I choose XAMPP to do that. I followed the procedure got from different sources but I cannot get that done.
I have done
ng build --prod
It's giving me error like Local workspace file ('angular.json') could
not be found
I am stuck with this problem. I cannot go forward. I am new to AngularJS and PHP. Can some one help me out.
I have got the code from git hub. Just for practice I am trying to host this first. But I am unable to do that.
The folder structure is as

What kind of remote server service was I using?

I’m part of a very small company that uses a database hosted on a server (104.131.##.###). However, the server no longer responds and the person who set up and owns the server space has already left the company. This past employee seems disgruntled so they won’t help. It’s complicated, but we decided to open a new server. The only issue is, I don’t know what we were using.
What I do know is I would access and change the database at http://104.131.##.###/phpmyadmin/ (image of login below)
I also had php files stored on the server using Filezilla (in a “var” folder, if that helps) which were accessed via path: http://104.131.96.###/path/to/file.php
I’ve set up a version of the same server using xampp on my own computer, but I can’t keep my computer running constantly.
So my question is, what service were we using / should we use? Where would I start to set up a new server like this? (I still have the php files and can recreate the db)
I've looked into AWS and digitalOcean, but I'm in a bit over my head and can't tell if they're offering what we need.
Any help would be appreciated. Thank you
The server was using phpmyadmin and mysql and Digital Ocean.
So you need at least a LAMP stack. With the info given we can't help you more.

Wordpress Change URL after Migrating to Amazon EC2

I am doing migration of Wordpress from one Amazon EC2 instance to another Amazon EC2 instance after it is messed up. So I did the installation of LAMP from the AWS documentation. I have moved my Wordpress contents into /var/www/html. I have also prepared the database accordingly and run the .sql backup file.
But then when I go to the IP address, it just could not load. My guess is the current Wordpress is using the old IP of the instance while I now have a new IP for the new instance. How do I fix this?
So far what I did to get access into the website:
Based on https://codex.wordpress.org/Changing_The_Site_URL I have put below code in my wp-config.php file
define('WP_HOME','http://X.X.X.X');
define('WP_SITEURL','http://X.X.X.X');
But it did not work. Any guidance is highly appreciated. Thank you.
UPDATE:
Sorry for being unclear about the observation. Says my old IP was http://1.1.1.1, and my new IP is http://1.1.1.2. After the changes, when I try to go to http://1.1.1.2, it just like take some times to load then suddenly it tries to bring me back to http://1.1.1.1. And of course eventually I'll receive time out error message because old IP is no longer available.
I am using Apache web server, latest Wordpress 4.5, http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html#wordpress-troubleshooting
So I managed to find the workaround after adding the .htaccess file. To summarize, here are what I did:
Put the define function in wp-config.php
change WordPress site URL with the wp-cli with the help of AWS documentation http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html#wordpress-troubleshooting
Put back the .htaccess file into /var/www/html and change the previous IP to current IP
Last thing I did that does the magic was clear cache in the browser. And finally my website now could be opened. Thank you for the comments above and that really help.

Categories