I'm trying to set up a virtual machine (vmware workstation 8.0.2) running CentOS 6.2 (i386) to mirror my live server so I can work locally. I'm running Windows 7 64bit. I have installed CentOS, PHP & MySQL they all seem to be running fine.
I now need to get it to access my files on the windows machine. I've installed the VMware tools and can now see the shared folder in /mnt/hgfs/Work/. I now need to point apache to the files here so it can use them, to do this I edited httpd.conf from:
DocumentRoot "/var/www/html"
to
DocumentRoot "/mnt/hgfs" (also tried DocumentRoot "/mnt/hgfs/Work")
when I restart apache it fails and I get:
Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
I've used Linux, but not very often so it's probably something obvious I've missed, I'd really appreciate any help on this.
Check that you are not having trouble with SELinux, which is enforcing by default on CentOS 6.
You can either disable it by editing /etc/selinux/config or read up on it here
http://rackerhacker.com/2012/01/25/getting-started-with-selinux/
Related
I have apache installed on my windows machine with locally installed PHP 8 on it. now for a single project I need 5.6 (don't blame me customer is not ready to move on). So I install a php-fpm-alpine docker on my machine and configure the .htaccess in my project folder to attach to that fpm.
It works in sense that I can see all request been logged in my Docker Log, but it is not finding the file. and hence cannnot execute it.
my apache configuration is simple.
<FilesMatch \.php$>
SetHandler "proxy:fcgi://localhost:9000/www/var/html$1"
</FilesMatch>
my docker gives 2 option to set /var/www/html to my windows folder that I configure correctly as I can go in command line of docker and can do ls /var/www/html and it shows all project file with www-data user fine. and port is working too.
I believe the PHP-fpm is not using the folder define by /var/www/html properly and looking somewhere else but I have no idea where to check.
I just started working in VS 2012. I started the IIS service successfully, but alongside I wanted to use Xampp also. So, I changed http.conf file's (inside Xampp's Apache folder) servername localhost 80 to servername localhost 8080 and both the servers were working fine.
The problem occurred when I tried to install Xampp with php version 7. I uninstalled old version of Xampp and installed the new version. In my browser the localhost:8080 url shows Xampp dashboard. But I can't see anything in url localhost, which showed me IIS server's dahboard before I had done all this mischief .
Can anyone explain what happened and help me resolve this issue?
Apache won't start on Mac with XAMPP. I tried updating PHP from 5.5.6 to PHP 5.6.8, and since that update XAMPP wouldn't start Apache. I tried completely re-installing XAMPP, but same issue.
Help would be appreciated, I'm more than happy to post any information that is necessary, not sure where to start. I've done a lot of looking around and haven't been able to find anything that points me in the right direction - I checked the Apache error_logs and there aren't any.
Try this -
Solution#1
This solution worked perfectly fine for me..
1) Close XAMPP control
2) Open Activity Monitor(Launchpad->Other->Activity Monitor)
3) Select filter for All processes (default is My processes)
4) In fulltext search type: httpd
5) Kill all httpd items
6) Relaunch XAMPP control and launch apache again
OR, Solution#2
sudo apachectl stop
This command kills Apache server that was pre-installed on MAC OS X.
OR, Solution#3
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
This will disable OSX's built-in Apache server and allows XAMPP to start on 80.
Now once Apache starts successfully modify the .htaccess file
Apache needs to be configured to recognize index.php as an index file. While adding 'DirectoryIndex index.php' to a .htaccess file may work,
NOTE:
In general, you should never use .htaccess files
This is quoted from http://httpd.apache.org/docs/1.3/howto/htaccess.html
Although this refers to an older version of apache, I believe the principle still applies.
Adding the following to your httpd.conf (if you have access to it) is considered better form, causes less server overhead and has the exact same effect:
<Directory /myapp>
DirectoryIndex index.php
</Directory>
I've updated PHP to 8.0 in xampp by renaming old PHP folder to PHP_7.4
and new pasted new php8 folder as php folder, it gave me same error,
SOLUTION
Step1: backup old php folder,
Step2: Paste php8 files in to old PHP folder and overwrite existing files,
Done: Restart Apache it should start
I've installed Apache 2.2 on a Windows machine for use in PHP local coding & debugging. Apache is not running however, says running 0 of 1 services.
When I try to restart it it just says "requested operation failed".
The output from the Test configuration says ScriptAlias takes arguments, a fakename and a realname. The actual lines in the script causing the problem -
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
ScriptAlias /php/ ""
Action application/x-httpd-php "php-cgi.exe"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
Has anyone encountered this before?
Make sure port 80 is free, programs like Skype or IIS use it.
XAMPP has a tool for knowing if all ports required are free.
I have put together a small ubuntu 10.04 server with apache2 and php for use only for testing purposes. I am finding suphp keeps getting in my way. Doubtless this is a useful tool for security etc, but right now, as this is only a local testing ground I would like to disable it to prevent it continually throwing errors relating to file ownership etc.
So, as the title says: How do I disable suphp on ubuntu server 10.04.
Thanks
a2dismod suphp -> to disable su php mod
instead of disabling all use virtual hosts conf file or http.conf and add
<VirtualHost ..>
suPHP_Engine off
...