I'm trying to Install Apache PHP MySQL phpMyAdmin on Windows 10, so I started with Apache so I downloaded it and I installed it as a service with :
>httpd.exe -k install
and then I typed httpd.exe -k start
and this problem shows up
when I open httpd.config file and change it from :
to :
and run httpd.exe -k start the error's not there anymore but when I head up to my browser and type http://localhost
I'm supposed to get a page saying : it works
but instead I got this :
I read this
Apache restart causes DocumentRoot must be a directory, even though it is a directory and there seem to be no privilege issues
https://forums.centos.org/viewtopic.php?t=1053
but it didn't help. How can I fix this error?
you need to use /
"C:/Program Files (x86)/Apache Software Foundation/Apache24"
not this
"C:\Program Files (x86)\Apache Software Foundation\Apache24"
Related
I'm setting up Apache and Home Brew on my local host for Mac Catalina and unable to restart apache after installation. This is the error I'm getting:
AH00526: Syntax error on line 248 of /usr/local/etc/httpd/httpd.conf:
DocumentRoot '/usr/local/opt/httpd/Users/my-computer/Sites' is not a directory, or is not readable
I tried to get rid of the quotes around my Document Root info as that seems to be the syntax error? I have checked and the directory does in fact exist.
DocumentRoot Users/my-computer/Sites
<Directory Users/my-computer/Sites>
I'm opening httpd.conf on sublime3 using zsh via this command:
sublime /user/local/etc/httpd/httpd.conf
Linux Mint 18
Apache2 server
MYSQL Server
Hello! Does anyone have a moment to advise me?
Here's my problem in brief: I am trying to configure phpMyAdmin on a Linux Mint 18 computer, but when I try to view http://localhost/phpmyadmin/, I get a "phpMyAdmin demo server" screen.
Details:
The phpMyAdmin web page begins with an addJSON statement, and echoes this message:
'You are using the demo server. You can do anything here, but please do not change root, debian-sys-maint and pma users'
I understand I am viewing some sort of demonstration page for phpMyAdmin, but I would rather view the actual, familiar phpMyAdmin administration page.
Do I need to edit the Apache2.conf file? Or something else? Thank you very much for your time.
Eric
i had this problem with ubuntu 16.04
fix
1# Remove phpmyadmin completely
sudo apt-get remove phpmyadmin
2# Install phpmyadmin with this command
sudo apt-get install phpmyadmin apache2-utils
3# add phpmyadmin to the apache configuration
sudo nano /etc/apache2/apache2.conf
And put below line to end of the file
Include /etc/phpmyadmin/apache.conf
4# restart apache2
sudo systemctl restart apache2
or
sudo service apache2 restart
I had the same problem, but my error was because I commented the Handler in php.ini
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
I just enable php on apache and start work normal
a2enmod php7.3
I had to disable mpm_event because it was causing some comflict
a2dismod mpm_event
Perhaps PHP code is not being executed, instead code shows on the page or Apache shows php code instead of executing may help.
Linux Mint is similar to Ubuntu/Debian, so you need the libapache2-mod-php5 package installed (assuming you've used the package manager to install the rest of your PHP/Apache stack): sudo apt-get install php5 libapache2-mod-php5.
You can test this further by adding a file (called test.php or phpinfo.php or whatever else suits you) in the main phpMyAdmin folder with the content <?php phpinfo(); ?> -- then try to load that file directly and see if you get a long list of system status or simply the contents of the file displayed. The main reason to put it in the phpMyAdmin folder is that your Apache configuration might handle different folders differently, this is the simplest way to test what happens on that particular folder.
I just installed in my MacBook pro "El capitan" and I can't type any host set it in vhost. Everything was working perfectly before in Yosemite. When I type one of my virtualhost I get:
403 "Forbidden You don't have permission to access / on this server."
What did I try ?
go to /etc/apache2/httpd.conf
and uncoment this lines:
Include /private/etc/apache2/extra/httpd-vhosts.conf
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
/etc/apache2/extra/httpd-vhosts.conf is the same file that was working before in Yosemite since long time ago, so I haven't modified.
To install everything in Yosemite I used homebrew.
Another problem related with "El capitan", before I was able to type http://localhost/~myuser/ and I could access to any folder in /Users/myuser/Sites now I get this message: 404 not found.
I hope some help, I am not specialist in servers and it's really difficult to me to set it up, and is very annoying to waste a lot of time anytime there is a new upgrade in the OS.
The upgrade process keeps a copy of your old httpd.conf. Unless you were way out of date, just overwrite the new file with your old one. Keep a copy of the new just in case...
sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.after-update
sudo mv /etc/apache2/httpd.conf.pre-update /etc/apache2/httpd.conf
sudo apachectl restart
I had the same trouble.
Type this command line you will have the error from apache :
apachectl configtest
If you have this error :
AH00526: Syntax error on line 20 of /private/etc/apache2/extra/httpd-mpm.conf: Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration.
so this link can help : https://apple.stackexchange.com/questions/211015/el-capitan-apache-error-message-ah00526
I experienced that after the upgrade to El Capitan the line
Include /private/etc/apache2/extra/httpd-userdir.conf
in
/private/etc/apache2/httpd.conf
was commented again. After uncommenting it and restarting apache, everything worked alright again.
I have merged to two versions (httpd.conf and http.conf~previous) and after that I discovered that the v-host wasn't working anymore.
After disabling rule 19 #NameVirtualHost *:80 in /private/etc/apache2/extra/httpd-vhosts.conf everything worked again!
LockFile is a directive of Apache ≤ 2.2. El Capitan comes with Apache version 2.4. so, you need to disable LockFile
First, just to be sure apache is stopped:
sudo apachectl stop
Then edit your httpd-mpm.conf:
Comment this lines
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile "/private/var/log/apache2/accept.lock"
</IfModule>
</IfModule>
Start apache sudo apachectl start and that's all
As some have mentioned the problem is that the upgrade to El Capitan backed up your previous httpd.conf and renamed it httpd.conf~previous and gave you a new httpd.conf. What you need to do though with these files to fix your problem is:
Use nano or other editor to open httpd.conf~previous and look for these 2 lines:
DocumentRoot "/Users/my-machine-name/Prev-Localhost-Path
<Directory "/Users/my-machine-name/Prev-Localhost_path">
Copy them and then using nano open httpd.conf and look for these 2 lines:
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
Comment them out by entering the '#' character in front of each one, and then below them paste in the two lines you copied from your original file. Save the file and exit.
After that you'll need to reboot. My setup would not work until I made these changes and then rebooted. But perhaps the suggestion by DSG to restart apache will suffice:
sudo apachectl restart
I have installed Web MO on Ubuntu 12.04 , I successfully complete the step given in link Web MO installation
But when I click on the URL specified at the end of setup process it shows as 404 NOT FOUND error
So I start configure the Apache Web Server
Steps for configuring Web Server
as mentioned in web server configuration
cd /etc/httpd/conf not found in /etc folder
in /etc folder there exist an apache2.conf file and httpd.conf file , but httpd.conf file is empty where apache2.conf file is not.
I want to edit some lines in httpd.conf
how can I do these , is there is any way to get contents in httpd.conf file
Thanks in Advance....
To find your server config file. You can use the following command for httpd, apaceh2 and apachectl (and maybe even more):
"apache name" -V | grep SERVER_CONFIG_FILE
so for apache2 it will be
apache2 -V | grep SERVER_CONFIG_FILE
I am new into web page making in ubuntu studio.
I downloaded Apache 2, and when I type localhost in my browser I get the Apache2 Ubuntu Default Page, which tells me to replace the index file. But when I try to do it I can't, because there is some sort of permission lock in the var/www/html folder
How do I change this, or how should I proceed?
To change the index.html file you need root permissions. Try to run this command from terminal to edit the file:
sudo gedit /var/www/html/index.html
That will run the gedit under the root user. You can read more about sudo command here http://en.wikipedia.org/wiki/Sudo