Setting up PHPMyAdmin on Amazon EC2 - amazon-ec2

I've installed PHPMyAdmin on my Amazon EC2 instance using the following:
yum --enablerepo=epel install phpmyadmin
Then symlinked it to /var/www/html with
ln -s /usr/share/phpmyadmin /var/www/html
When I navigate to /phpmyadmin in my browser, it gives me a 403 Forbidden saying I can't access /phpmyadmin/ on the server.
Thanks for any help.

from here you should edit phpMyAdmin.conf to allow the access

Related

phpmyadmin 500 Internal Server Error after sudo a2enmod rewrite

I configure my server for Laravel app with the composer. this is installation process:
apache2
PHP
MariaDB
phpmyadmin
until here the phpmyadmin works. but after Laravel installation and specially using sudo a2enmod rewrite for registering VirtualHost, I get the 500 internal server error on phpmyadmin. whats the problem?
First, you need to check error here the : nano /var/log/apache2/error.log
In my Case Error was .htaccess: Invalid command 'Header', perhaps misspelled
Solution :
sudo a2enmod headers
/etc/init.d/apache2 restart

laravel won't run on ubuntu server

this is my first time using ubuntu server and i want to give it a try. I already did the apache2, mysql, phpmyadmin install, and VirtualHost setup. And I already download my program from github on /var/www/html/project/. Usually when I run redirect my VirtualHost to /var/www/html/project/public laravel would automatically start, but instead i got show a coding from /var/www/html/project/public/index.php. What did i do wrong?
to setup VirtualHost first I type sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/project.dev.conf and type this code
<VirtualHost *:80>
ServerName project.dev
ServerAdmin project#dev.com
DocumentRoot /var/www/html/project/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/custom.log combined
</VirtualHost>
and then on terminal I typed sudo a2ensite project.dev.conf then restart sudo systemctl reload apache2
I followed this link https://help.ubuntu.com/lts/serverguide/httpd.html
As you had listed you had already installed the apache2, mysql, phpmyadmin. According to me you are not installing the php on your ubuntu server. Try for checking the
<?php echo phpinfo(); ?>
If not then you can install by the following command:
sudo apt-get install php7.2 php7.2-cli php7.2-common
And by following command you can download the most commonly used php extensions:
sudo apt-get install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip
After that you can install and setup the firewall for security purpose. And don't forget to protect your phpmyadmin page from direct opening.
change .dev to .qa
google chrome update prohibits to use .dev locally.

unable to read and write htdocs folder in XAMPP

I am creating a laravel project within /Applications/XAMPP/htdocs.
I used following to apply the read and write privilege to htdocs folder in XAMPP folder
sudo chmod -R 777 htdocs
Then I create the project within /Applications/XAMPP/htdocs
create-project laravel/laravel [Project Name]
It shows error
Installing laravel/laravel (v5.6.12)
[ErrorException]
mkdir(): Permission denied
Does anyone know how to solve this problems?
Appreciate for the help
Updated:
I solved this problem by installing the lower version of XAMPP.
Change document root of the server.
I assume your xampp installation folder is
/opt/lampp
Run sudo gedit /opt/lampp/etc/httpd.conf on the terminal to edit httpd.conf file.
You have to change these two lines.
DocumentRoot "/opt/lampp/htdocs"
<Directory "/opt/lampp/htdocs">
Then change /opt/lampp/htdocs directory to any directory in your home folder for example /home/yourUserName/htdocs
Note: Replace "yourUserName" with your username.
After that, those two lines should look like
DocumentRoot "/home/yourUserName/htdocs"
<Directory "/home/yourUserName/htdocs">
After saving the changes run sudo /opt/lampp/lampp restart to restart apache
Now create local projects in your /home/yourUserName/htdocs directory without any permission problem.
sudo chmod 777 htdocs
You should use -R if you are allowing a file. You shouldn't use -R if you are allowing a folder.

Valet - phpMyAdmin throws 404 not found

Before installing Laravel and Valet on my dev environment (Ubuntu), I had installed PHP 7, MySQL and phpMyAdmin and everything was working fine.
In order to install Valet I had to disable apache2 as Valet was complaining during the instalation and add nginx and follow these steps https://github.com/cpriego/valet-linux/wiki/Requirements:%20Ubuntu
However after the instalation when I try to access the phpMyAdmin through the browser I'm getting the default white page 404 - not found. How can I fix this?
You have parked your workspace directory using
valet park
Clone the phpmyadmin repository using
git clone https://github.com/phpmyadmin/phpmyadmin --depth=1
cd phpmyadmin
composer install
In the same directory just download phpmyadmin package & extract it. You will be able to access it from
http://phpmyadmin.test
If you have phpmyadmin already installed from your last setup, you don't have to download it & install it again.
I was facing the same thing migrating to valet from lamp, this is what I did:
1- Navigate to original phpmyadmin folder
cd /usr/share/phpmyadmin
2- Then add a link to valet
valet link
Hooray! you can now access it at: phpmyadmin.test
If you changed a port 8080. You can try this
localhost:8080/phpmyadmin/
I tried this and it failed to work for me, I found a workaround, check the link for my solution: https://stackoverflow.com/a/47211246/8768078

Can't access localhost/laravel in LAMP

I'm new to Ubuntu 14.04 and I installed LAMP and I install laravel in /var/www but it seems that I can't access localhost/laravel in my server it says.
So what I'm missing here?
Edit:
It works when i try php artisan serve then it gives me localhost:8000 but when localhost/laravel it doesn't work.
It's because of your Apache is not working. You can start your Apache by the following command
sudo service apache2 start
You can see more about start/stop/restart Apache at here.
Or if you want to re install your lamp, so you can see at here

Resources