Muntansir
By:
Muntansir

My new Website doesn't work Error 500 Help please!

June 29, 2016 945 views
WordPress Apache

Hi,

I have set up many websites on my server however when setting up a new website www.shakirart.co.uk it does not seem to work, when I go into the browser I get an error 500 I have checked all the settings and it is pointing to the right place. I currently have quite a few websites already active on the same server these are:

www.coffeeinnleyton.co.uk
www.fatinii.co.uk

and a few others.

Any help will be appreciated have been trying for ages but I can't see to find the problem.

Thanks in advance for your help.

Regards,
Muna

6 comments
  • What's the output to the following command

    sudo apachectl configtest
    
  • Usage: apache2 [-D name] [-d directory] [-f file]
    [-C "directive"] [-c "directive"]
    [-k start|restart|graceful|graceful-stop|stop]
    [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
    Options:
    -D name : define a name for use in <IfDefine name> directives
    -d directory : specify an alternate initial ServerRoot
    -f file : specify an alternate ServerConfigFile
    -C "directive" : process directive before reading config files
    -c "directive" : process directive after reading config files
    -e level : show startup errors of level (see LogLevel)
    -E file : log startup errors to file
    -v : show version number
    -V : show compile settings
    -h : list available command line options (this page)
    -l : list compiled in modules
    -L : list available configuration directives
    -t -D DUMPVHOSTS : show parsed vhost settings
    -t -D DUMP
    RUNCFG : show parsed run settings
    -S : a synonym for -t -D DUMP
    VHOSTS -D DUMPRUNCFG
    -t -D DUMPMODULES : show all loaded modules
    -M : a synonym for -t -D DUMP
    MODULES
    -t : run syntax check for config files
    -T : start without DocumentRoot(s) check
    -X : debug mode (only one worker, do not detach)

  • @Muntansir - Let's try again, but with -t instead as a parameter to test the configuration files

    sudo apachectl -t
    ## followed by
    sudo apachectl -t -D DUMP_VHOSTS
    
  • muna@Private-Server-Basic:~$ muna@Private-Server-Basic:~$ sudo apachectl -t
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
    Syntax OK
    muna@Private-Server-Basic:~$ sudo apachectl -t D DUMPVHOSTS
    Usage: /usr/sbin/apache2 [-D name] [-d directory] [-f file]
    [-C "directive"] [-c "directive"]
    [-k start|restart|graceful|graceful-stop|stop]
    [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
    Options:
    -D name : define a name for use in <IfDefine name> directives
    -d directory : specify an alternate initial ServerRoot
    -f file : specify an alternate ServerConfigFile
    -C "directive" : process directive before reading config files
    -c "directive" : process directive after reading config files
    -e level : show startup errors of level (see LogLevel)
    -E file : log startup errors to file
    -v : show version number
    -V : show compile settings
    -h : list available command line options (this page)
    -l : list compiled in modules
    -L : list available configuration directives
    -t -D DUMPVHOSTS : show parsed vhost settings
    -t -D DUMP
    RUNCFG : show parsed run settings
    -S : a synonym for -t -D DUMP
    VHOSTS -D DUMPRUNCFG
    -t -D DUMPMODULES : show all loaded modules
    -M : a synonym for -t -D DUMP
    MODULES
    -t : run syntax check for config files
    -T : start without DocumentRoot(s) check
    -X : debug mode (only one worker, do not detach)
    Action '-t D DUMPVHOSTS' failed.

  • @Muntansir - Looks like the configuration is parsed OK (from the first command output "Syntax OK"). However, proper cutting and pasting for the second command should have gotten better results. The command was

    sudo apachectl -t -D DUMP_VHOSTS
    

    Note the dash or minus character in front of the D parameter.

  • Thanks so much for your help as you can probably tell my attention to detail suck, in one of the configuration files I had forgot to add a ; and hence was getting a syntax error.

3 Answers

It would appear you were able to get your sites up and running, yea?

  • Nope still get the error 500.

    • Odd, the two domains you provided were:

      www.coffeeinnleyton.co.uk
      www.fatinii.co.uk

      Those are both working. With that said, I would suggest to review the web server log for the domain in question, as that will provide details on the 500 error you are receiving.

      • Hi,

        Apologies I was being unclear. So I have recently bought the new domain www.shakirart.co.uk and have set it up in the same way as the other two however can't seem to find out why it isn't working. The others are also hosted on my server and are working fine it is just this website that won't work and I am clueless as to why...

        Regards,
        Muna

        • Muna,

          Appreciate the clarification. The domain you just referenced is showing a 500 error, as you mentioned. Now, it would seem this could be misconfiguration in your code; something serving that website is not allowing the Apache webserver to serve content.

          With that said, I would suggest to hop into your Droplet, to review the error log for your Apache webserver. You can find that at /var/log/apache2/error.log, specifically you can run tail -n50 /var/log/apache2/error.log That command will output the last 50 lines of the error log. Within that, you should be able to see the domain that is causing you issues.

          Another more specific route to only pull that particular domain from the error log, you can run the following grep www.shakirart.co.uk /var/log/apache2/error.log

          Feel free to toss a few lines of the error log here!

          • Thank you so much for this, there was a syntax error in one of the files and upon further inspection I had forgot to end it with a ;. My attention to detail is bad and clearly coding isn't for me really but I just wanted to say a huge thanks!

Check the issue on your server log, I thought your website have some coding error in your script. Just find and fix the problem.

Have another answer? Share your knowledge.