Amazon EC2 hide phpmyadmin route [duplicate] - apache

I am wondering how to change the default URL for phpMyAdmin. I am using the latest version (4.0.4.1) on my CentOS 6 VPS. I am wanting to change it from /phpmyadmin to something more secure. I am unsure how to do this or where to even find my apache.conf file if there is one?
Thanks!

For ubuntu (i used ubuntu 12.04), the default phpmyadmin apache configuration can be found at /etc/phpmyadmin/apache.conf
You can open it by type sudo nano /etc/phpmyadmin/apache.conf and change the third
Alias /yournewalias /usr/share/phpmyadmin
Do not forget to restart apache service,
sudo service apache2 restart

phpMyAdmin default Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin
Change that to
phpMyAdmin default Apache configuration
Alias /anyname /usr/share/phpmyadmin
Then make sure to restart Apache
sudo /etc/init.d/apache2 restart

Edit this file
/etc/apache2/conf-available/phpmyadmin.conf
line 3: change the line to be
Alias /whateveryouwant /usr/share/phpmyadmin

Related

How can I change the site file directory for an apache server? (Raspberry Pi)

Right now it's '/var/www/html' but I want it to be '/home/pi/FTP'
I can probably just change it in the config file, but i can't manage to find it, thank you in advance.
You'll have to edit apache2.conf and 000-default.conf to change the document root of apache.
The Apache server is installed on var/www/html.This is the default root directory of apache.
Either change the root directory of Apache or move the project to /var/www/html.
To change Apache's root directory, run:
cd /etc/apache2/sites-available
Then open the 000-default.conf file using the command:
nano 000-default.conf
Edit the DocumentRoot option:
DocumentRoot /path/to/my/project
Then restart the apache server:
sudo service apache2 restart

Invalid Command 'RewriteEngine' but mod_rewrite is enabled

I am setting up a gitlab site with this conf file
But this error arise:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
I have install apache 2.4.20 from source. And forgot that I have installed 2.4.7 with apt-get. Right now apache -v shows 2.4.7 though.
I have followed a lot of solutions but they do not work:
Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)
Apache2 ProxyPass for Rails App Gitlab
I have check the rewrite modules and it is there; a2enmod rewrite is enabled and service apache2 restart worked without the gitlab.conf file.
But with gitlab.conf, this error appear Invalid command 'RewriteEngine'?
I am having the same issue using Vagrant to setup a VM.
I finally resolved this by setting the ip for the client in the Vagrantfile configs:
config.vm.network :private_network, ip: "192.168.68.8"
Then adding to the local /etc/hosts file:
192.168.68.8 namespace.dev

Can't access localhost/phpmyadmin on Ubuntu 14.04

I get the "server not found" message in the browser when I try to access localhost/phpmyadmin/ and my websites configured in /etc/hosts and /etc/apache2/sites-enabled.
My "hosts" file:
127.0.0.1 localhost
127.0.1.1 website1
127.0.0.1 website2
...
How can I solve this problem?
Your phpmyadmin configuration might not be included by apache. Open apache.conf using your favorite editor
sudo nano /etc/apache2/apache2.conf
Then add the following line:
Include /etc/phpmyadmin/apache.conf
Then restart your apache server:
sudo service apache restart
Hope this helps.
As mentioned here
A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled

Apache set up mac os yosemite

I am trying to get Apache to run on my yosemite machine, but when i try to access localhost i get http://i.stack.imgur.com/ZzZzB.png.
I ran an apache configtest and got the following
Angus-Mac:mysql root# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Angus-Mac.local. Set the 'ServerName' directive globally to suppress this message
Syntax OK
What am i getting wrong? any ideas?
Uncommenting the ServerName and changing it to the domain name solved the issue.
change the group permissions on that folder to _www
sudo chgrp -R _www /Library/WebServer/Documents (all web content is now group _www)
chmod -R go-rwx /Library/WebServer/Documents (nobody other than owner can access web content)
chmod -R g+rx /Library/WebServer/Documents (all web content is now readable/executable/enterable by _www)
then restart apache
It seems your user in httpd.conf is different that the one on the web directory
I found the solution here
Please uncomment the ServerName in line 212 (httpd.conf) and change the domain www.example.com to your domain.
Restart apache

I've wrongly removed /etc/apache2

I'm wondering whether it's possible to install apache2 from scratch, I tried to install it and many times I was informed that a configuration file was removed, and everytime I chose to install the package responsible version. When starting apache service I have this apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName and the localhost url shows Page Web inaccessible.
How can I fix this?
Thanks in advance.
Just add to apache2.conf
Servername localhost
into last line.
(PATH)
sudo nano /etc/apache2/apache2.conf