0

Just set a VPS with this guide: "https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/". Everything looked perfect! but I started to notice (as I populated the server) that AJAX/jQuery where not functioning properly. mostly when posting "ajax/post".

My logs don't show much regarding this error. chrome's inspector tool shows:

"Failed to load resource: the server responded with a status of 500 (Internal Server Error)"

I have been searching for solution all over the internet and still can't have a clue on what is going on... Is there a tool to check server settings? some kind of debugger that I can use to find out how to spot the problem?? Please help me with this...

Update: I found this:

root@hs1:/var/run/apache2# apache2 -S [Fri Jun 21 17:35:49.287125 2019] [core:warn] [pid 23275] AH00111: Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

but my /etc/apache2/envvars sais:

# temporary state file location. This might be changed to /run in Wheezy+1 export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2.pid export APACHE_RUN_DIR=/var/run/apache2$SUFFIX export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX

  • It would be normal for your logs to record something regarding the error. Look further, increase log level. – Iain Jun 21 at 20:24
  • updated to debug level but still nothing on this... – Juano Holograma Jun 21 at 20:54
  • The only way to solve this is to find out what the server thinks the problem is.If it's throwing a 500 then it will almost certainly be leaving further information in a log somewhere. – Iain Jun 21 at 20:57
  • HTTP 500 is an "internal server error" triggered by some bit of code running in a php script or similar. The "failed to load resource" error is probably from some require_once or similar call that can't find the file it was referencing. If there was an error in your apache config, it wouldn't be running at all. – ivanivan Jun 21 at 22:06
  • You should look at the response body. You should be able to see it in the browser's developer tools. – Michael Hampton Jun 22 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.