Apache internal server error for Perl scripts - apache

I am installing a LAMP (Linux, Apache, MySQL, Perl) stack and I have an issue running some scripts on the web server. I have given full permissions (755) on the directories and files but still receive 500 internal server errors on some files.
See below browser console error & apache error log.
apache2.conf file:

The error is specified in the picture, together with a fix. Fix the code: remove defined from the indicated line.
See defined for details.

Related

Where can I find httpd.conf file for Apache on my windows?

I am trying to fix one venerability on my production web server(Apache), Venerability is "The HTTP headers sent by the remote web server disclose information that can aid an attacker, such as the server version and technologies used by the web server"
For this I have gone for some solutions , some where I found that to solve the above Venerability we need to edit the httpd.conf file on server but I did not find httpd.conf file in my entire system (using windows 10 os) can any one please let me know hot find that file or how to resolve that Venerability on production ?
You can find httpd.conf in
installed folder ex Apache24
Apache24/conf/httpd.conf
On Windows, I have seen people run Apache from all kinds of weird and wonderful places.
You need to track down where your Apache instance is running from, normally its running as a service on windows. If you open the properties on the service and look at the Path to executable, it should be something similar to the below.
"C:\Program Files\Apache24\bin\httpd.exe" -k runservice
Or it could be
"D:\Some Application\Version\WEB\tool\SOFTS\HTTPD\bin\httpd.exe" -k runservice
Unless there is an -f flag, setting the location of the conf. There will be a "conf" folder at the same level as the "bin" folder regardless of the path. This location is set at compile time so unless you have bespoke version off Apache this should be the location.
If you are struggling to find the service or a launcher that is running Apache. You can use WMI with a WQL query to look for processes which are called httpd.exe and get its executable path.
wmic process WHERE name="httpd.exe" GET ExecutablePath
In Xampp Control panel, in apache row, click on "config" button and then you see the term Apache(httpd.conf).

WAMP Server 3.0.0 cannot open apache conf file

I've re-installed WAMP in order to put it into a different directory. This was mainly so everything is automatically backed up.
Mysql starts ok, but apache fails with the following message from the event viewer:
The Apache service named reported the following error:
httpd.exe: Could not open configuration file bin/conf/httpd.conf: The system cannot find the path specified. .
This file is in the correct place (C:\googledrive\wamp64\bin\apache\apache2.4.17\conf) and there isn't any other stray httpd.conf files that it might be picking up on the path or anywhere.
Any ideas?
This turned out to be a permissions problem. It seems that the system account didn't have access to the directory containing the config file, but I guess must have had enough access to start up Apache and give that helpful (not) message!

Apache won't start on windows server

We are using Windows Server 2008 R2 Enterprise Edition. We have Apache 2.2 on it.
Whether I try to start him from the command line or via the Server Manager, I get this error
"A service specific error occurred: 1."
Google, Bing, and Yahoo found me sites that say this means that apache tried to access a file in a folder which doesn’t exist. (Is that true ?) Following that lead, more googling told me that I would find the culprit(s) in an error log file, purportedly on my server, in this subdirectory...
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\logs>
There is no record of my errors in any of the files in that subdirectory. There are, however, records of errors in the error.log file from two and three weeks ago. This, despite the fact that I can create that very error as many times as I want right here and now.
Immediate question: Where do I find the log of the errors that I have been creating today ?
Real question: why won't Apache start on my Windows Server ?
In conf folder, there should be file that tells Apache which port to run on. Make sure nothing else is on that port.

Configure Apache on Windows 7

I want to test some code on localhost before uploading to a live site. So I decided to install Apache. I'm running 64bit windows 7 enterprise edition. I downloaded httpd-2.0.64-win32-x86-no_ssl.msi. I installed it under C:\Program Files (x86)\Apache Group\Apache2
I have set domain name and server name to localhost in my installation, and used default value for all other steps. In my configuration file httpd.conf, I have ServerName localhost:80.
I followed everything I can find on online apache installation tutorials. But when I typed in localhost in my browser, I got a 404 error :(
I know it's very hard to diagnose this way, but I just wonder if someone can spot an important step I'm missing.
I'm feeling it could be something to do with my 64bit machine, and the long folder name Program Files (x86). But I have tried to install on C:\Apache directly and failed too (even got an error during installation). Can someone help?
Finally figured it out. Apache service didn't start because another system process was listening to port 80. Refer to these two posts for solutions:
http://forums.zpanelcp.com/archive/index.php/t-5265.html
http://www.softaculous.com/board/index.php?tid=1575&title=Apache_won%27t_start
Good luck to all!
Did you start the service?
Also, you should install XAMPP or WAMPP, which offers Apache, PHP and MySQL support without all the configuration hassle.
If you got a 404 error then either the webserver is running or you failed to start it and have something very wrong with the existing network config on your machine.
The latter is a lot more likely - and you can check this by looking at the logs which it has generated - there should be entries in both the access and error log.
If the problem is the spaces in the path (you'll see an error relating to the documentroot from the entries added to the error_log at startup) then (IIRC) you can either enclose the path in double quotes or use a path for the document root which doesn't have spaces - the content doesn't have to site below the directory you installed Apache into - indeed it's arguable that using a different path is good practice. Note that several versions of mod_fcgid don't like paths with spaces even if you quote them.

500 Internal Server Error On my website pages

When I open my website and any website pages, I get a "500 Internal Server Error". In the host, no .htaccess file exists.
The website works properly, but when I open any website pages, it's giving a 500 internal server error.
Please tell me what's the problem in the website.
Usually you can find more information on the kind of internal server error that happened in you webserver's error log file. (e.g. /var/log/httpd/error_log on many systems).
You may be work with a new version php in local server. But your hosted server may have older version php. Just upgrade your php version in cpanel
upgrade php version