I am trying to configure phpmyadmin on my localhost Apache24 server. I change the root file of the server with one costum, everything works fine, and when I am trying to add phpmyadmin I get this
phpmyadmin
I change the name of config.sample.inc.php into config.inc.php and a $cfg['blowfish_secret'] and doesn't help
config.inc.php
Thank you!
Check if you have installed your PHP correctly, by clicking on the index.php link on the list of your printscreen.
If you see a login page it means your PHP is ok, but you haven't informed your Apache to use index.php.
Run down your Apache configuration to the directory index and add index.php to the DirectoryIndex line like this:
DirectoryIndex index.php
first sorry form my bad inglis but i am spanish.
To install phpmyadmin follow next steps, are so easy.
First remove and purgue all old phpmyadmin files with ...
sudo apt remove --purgue phpmyadmin
Next step is install it again, use this commnand ...
sudo apt install php libapache2-mod-php php-mysql phpmyadmin php-mbstring php-gettext
Enable mbstring mod to php
sudo phpenmod mbstring
Next step is change dir mod
sudo nano /etc/apache2/mods-enabled/dir.conf
File content:
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>
Finaly restart apache
sudo service apache2 restart
If you can't solve your problem with this steps reply me on this post.
Related
I developed my Laravel Project on Windows using xampp. So I need to deploy this project in a Debian server. In this server, I've already installed apache2, php7.3 and composer. All fine. I transfered my project from Windows to Debian by ssh. Inside the project I had run composer update. But when I try to accesss via browser, I got 404 page not found error. Do I miss some step? Someone could please help me?
I missed to create an apache config to the new project:
Something like these:
sudo nano /etc/apache2/sites-available/meuprojeto.conf
Edit this file with the follow code:
DocumentRoot /var/www/html/meuprojeto/public
ServerName seudominio.com
Options +FollowSymlinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Config apache service to be sure it's enable:
sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service
Final steps:
Enable rewrite
sudo a2enmod rewrite
Enable your project config
sudo a2ensite meuprojeto.conf
Disable default config (default apache page)
sudo a2dissite 000-default.conf
Restart apache service
sudo systemctl restart apache2.service
Login route using localhost/project/public/login url shows error:
The requested URL /test/public/login was not found on this server.
Apache/2.4.34 (Ubuntu) Server at localhost Port 80
But using php artisan serve command it works perfectly fine.
What could be wrong?
solved:
OS: ubuntu 18.10
/etc/apache2/apache2.conf
add this line into this apache2.conf file:
<Directory /var/www/html/> AllowOverride all </Directory>
There are many reasons why your local host is not working.
Following could be one of the reasons:
1.Make sure that in /etc/apache2/sites-available/your-conf.conf file contains these things :
ServerName www.your-url.test
ServerAlias your-url.test
ServerAdmin webmaster#localhost
DocumentRoot /your-path/your-project/public
<Directory /your-path/your-project>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Problem could be with your PHP version. In our machine, there are two php:
1. For CLI(command line interface)
2. For apache server
Your laravel application may require higher or lower version of php in apache server.
For fixing that either update your php version in apache server to your required version or either setup the fpm for your projects. Then your localhost will start working.
There could be an error in your laravel application.
For checking that use command:
sudo tail -f /var/log/apache2/error.log
After hitting this command you'll see the errors that your laravel application is throwing.
But since your laravel application is running fine using serve command, so most likely problem in your case will be because of different PHP versions in CLI and apache server(front-end).
So you should either setup fpm or either upgrade or downgrade the apache server php version.
I had the same problem and i fixed it by setting up the fpm for my projects.
Thanks
The most common error in this situaion is related to unable mod_rewrite in apache do this :
sudo a2enmod rewrite
systemctl restart apache2
So I had trouble while installing Prestashop 1.7 correctly and thought I would post my own guide to install it with Homestead (vagrant, virtualbox):
There we go:
Download prestashop
Have vagrant and homestead installed
Cd into your homestead folder and run vagrant - vagrant up
Extract ONLY THE FIRST zip in "...code\prestashop" folder
Configure homestead.yaml file by adding:
sites:
- map: prestashop.test
to: /home/vagrant/code/prestashop
php: "7.0"
databases:
- prestashop
add 192.168.10.10 prestashop.test to your hosts file
run vagrant provision
Open "prestashop.test" (or whatever other name you put in the homestead.yaml file) in browser
Proceed with prestashop installation
Comment out (_install) or delete the install folder (otherwise you will get an error when trying to open prestashop in the browser)
vagrant ssh
In vagrant ssh cd /etc/nginx/sites-available and run ls to see if prestashop is present
sudo nano prestashop.test
Add this between root and index and change the admin name on BOTH lines to your generated unique one:
location /admin/ {
if (!-e $request_filename) {
rewrite ^/.*$ /admin/index.php last;
}
}
then sudo /etc/init.d/nginx reload
Open prestashop.test/admin() (in the brackets put your unique admin name (without the brackets) and voilĂ !
Instead of having to edit Nginx config file you can simply use Apache, all that you have to do is to specified apache as a site type:
sites:
- map: prestashop.test
to: /home/vagrant/code/prestashop
php: "7.0
type: "apache"
It looks like there are some issues with Nginx that require to edit the config by hand just as #Todor did, more info here Does PrestaShop 1.7 work with Nginx? - General topics - PrestaShop Forums
In PS version: 1.7.6.7 i was forced to uncoment those two lines in .htaccess located in admin folder:
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)) %{ENV:BASE}/$2 [R=301,L]
Before that for links like: http://presta17.shop/admin466vvxojo/improve/modules/manage?_token=ZrnM85TEsROusexXinPySyjZQghmfHO7d7sSFI3Tgm4
with /index.php/ i get only: Access denied.
Hi I am very new to programming. I am trying to access apache through localhost and I am using xampp. Everything is running, when I type in localhost and it does show "it works!", but when i enter localhost/~alexpham/ it shows not found! I have created a folder inside user. Any help would be great. I have tried everything.
cd /etc/apache2/users
Directory "/Users/alexpham/Sites/">
Options Indexes MultiViews
AllowOverride All
Require all granted
Allow from all
/Directory>
Alexs-MacBook-Pro:users Alexpham$ sudo chmod 644 alexpham.conf
Alexs-MacBook-Pro:users Alexpham$ sudo apachectl restart
Alexs-MacBook-Pro:users Alexpham$ cd ~/Sites/
Alexs-MacBook-Pro:Sites Alexpham$ open .
Alexs-MacBook-Pro:Sites Alexpham$ nano index.html
I have a problem with my local Apache webserver. I've diabled and removed the 000-default.conf file using the following commands as root user.
a2dissite /etc/apache2/sites-available/000-default.conf
rm /etc/apache2/sites-available/000-default.conf
I've created this new default.conf file, that redirects HTTP requests to the HTTPS version:
<VirtualHost *:80>
Redirect permanent / https://xxx.xxx.xxx.xxx/
</VirtualHost>
Finally I've enabled the site and restarted the sever using:
a2ensite /etc/apache2/sites-available/000-default.conf
/etc/init.d/apache2 restart
My problem is that my server does not apply the new settings. To me it seems as if it still uses the deleted 000-default.conf settings.
Use this
a2ensite /etc/apache2/sites-available/default.conf
/etc/init.d/apache2 restart
Here you are using wrong file name