Apache2 fails on reboot..

Discussion in 'Installation/Configuration' started by husskii, Jan 17, 2010.

  1. husskii

    husskii Member

    damn after all that I had to just get out of the house and away from my pc for a few hrs, fresh air never felt so good lol..

    for a while that made me feel so stupid, but I'm glad to know its not just me. as they say its always in the last place you would think to look :/

    Ill go through the master config now and make sure nothing looks out of place...
    Thanks for the heads up :D

    Then Im on to my next brick wall (elgg), but I think maybe that minor glitch I just had, may of been the cause so fingers crossed I should have my perfect server working the way a perfect server should...
     
  2. husskii

    husskii Member

    master config is in working order, but elgg is being a pain as usual :/
    I have decided I hate elgg and it looks like elgg hates me lol, I think the problem is caused because of the file permissions, Im able to change them but after I try configure elgg and it fails I notice the permissions have changed to 644, which also prevents me from manually configuring the settings.php file.
    I tried to chmod the files and even the whole folder via ssh and it didnt change them, I also tried changing them via ftp and same thing. I thought maybe I download the settings.php to my pc and then configure it and upload it back to the server, but again it wouldnt let me.

    I guess the good thing is that, every time I messup and delete the website to start over, I know what to look for to get apache2 working again, which saves me having to reinstall lol.
    because again apache2 wouldn't restart, but all I had to do was delete that symbol [ from
    Code:
    /etc/apache2/sites-enabled/monsterhost.co.cc.vhost
    again and then reload apache2.. which worked :D

    But yep back to square one with elgg, what a pain...
    back to the drawing board lol...
     
  3. oilyflutesalad

    oilyflutesalad New Member

    May seem a silly question, but have you tried logging into SSH as root and then editing the file?
     
  4. husskii

    husskii Member

    no that's not a silly question at all, I have tried loging in as root and changing the permissions, but didn't try editing the actual file through nano.. Ill give that a try now..

    thanks :)
     
  5. oilyflutesalad

    oilyflutesalad New Member

    You shouldn't need to nano anything, just do this:

    Code:
    ssh root@[serverIP]
    [rootPassword]
    vi /path/to/settings.php
     
  6. husskii

    husskii Member

    Hi oilyflutesalad
    I tried that but with nano, because I dnt know how to use vim properlly yet, i use nano as my editor and I tried nano /path/to/settings.php via root, but I couldnt locate them, every time I tried, I would just get a blank file, which tells me im using the wrong path.

    I made sure the permissions were changed this time I not only did I change the engine folder permission but I made sure settings.example.php was also changed.. but still I got the following error..[​IMG]
    so I started again, but manually edited the settings before I uploaded the files, and still no difference, it would all lead back to that error page.

    also i noticed again that the .htaccess file was hidden, even tho i ran
    Code:
    echo "yes" > /etc/pure-ftpd/conf/DisplayDotFiles
    as soon as i upload the files to the server, .htaccess disappears.

    after i long sleep my mind should be a little clearer this morning lol, so ill reattempt it and see were Ive gone wrong.

    but I should also add that Im using ispconfig3.0.1.6 and when i create a database instead of it being default_elgg database, the default for this version is, c0 so it becomes c0elgg... but Ive tried both, default_elgg & c0elgg and it help...
     
  7. oilyflutesalad

    oilyflutesalad New Member

    All that error says is that you've probably used the wrong user/pass for the database. If you're telling Elgg to use a database account other than root, make sure it has permission to access the Elgg database. You should also make sure you used the right connection details. The defaults are localhost and port 3306.

    You can change the user prefix for FTP, Shell and Database users in ISPConfig. Go to System > Interface Config to set these values. I personally use c[CLIENTID]_ which would result in something like c3_default. If you add the [DOMAINID] prefix (link in sig) you can also use that for FTP users, though it doesn't yet work for database users.

    If you're not using the root account, I would recommend trying that for the database when you set up Elgg.
    Code:
    Server:   localhost
    Port:     3006
    User:     root
    Password: [yourRootMySQLPassword]
     
  8. husskii

    husskii Member

    Elgg Site Wont Delete

    Even tho I have deleted the site I created for elgg & its database. when I navigate to the url I still get the elgg error, its also preventing me from creating a new database and reattempting the elgg setup, I checked my
    Code:
     /etc/apache2/sites-enabled/monsterhost.co.cc.vhost
    and noticed that the settings of the old elgg site I created is still in it. Could I get some help please on maybe hot to edit it so I can start over again.

    thanks.
     
  9. oilyflutesalad

    oilyflutesalad New Member

    Code:
    rm /etc/apache2/sites-enabled/monsterhost.co.cc.vhost
    rm /etc/apache2/sites-available/monsterhost.co.cc.vhost
    rm -r /var/www/clients/clientX/webY
    rm var/www/monsterhost.co.cc.vhost
    Where X is the userID of the site owner, and Y is the site ID.
     
  10. husskii

    husskii Member

    Your a champ thank you, ill get straight to it..

    see I thought maybe I should delete the files but then thought maybe it was better to edit them instead.
    because I thought maybe now I wont have a vhost, and guess what, now when I go to the url, www.monsterhost.co.cc
    first I recieved the appache2 403 error, I had no permissions to access, then I reloaded apache2 and now it just takes me back to the
    page.
    Im trying a reboot and see what happens but I think I might need to create an empty vhost for elgg to work, not sure but Ill go over the tutorial and see if we did anything like that when setting up the server...

    Thanks :)

    :( nope cant find anything that symbolizes vhost, I wonder if I recreat the files, how that will do, i guess if its no good I can always delete them again...
     
    Last edited: Jan 20, 2010
  11. oilyflutesalad

    oilyflutesalad New Member

    The vhost files are all in /etc/apache2/sites-available

    Not sure why you're getting the default apache page, I get the same. But if I type mine without the 'www.' then I'll get the ISPC page instead. Not entirely sure why it works like that though.

    As long as you get the apache page you should be fine. Just upload your website files to /var/www/ (I gave you this path in IRC, but you were making another coffee to drop or something)
     
  12. oilyflutesalad

    oilyflutesalad New Member

    Oh, and when I gave you all the rm commands I forgot to mention to delete the site in ISPConfig then re-create it. Oops
     
  13. husskii

    husskii Member

    I tried that, but after I used the RM commands o.0 also tried recreating them and deleting then recreating atc, even tried a whole new domain name, but all FAILED :(
    I think I have no option but a reinstall
     

Share This Page