Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

quick linux question

  • 19-03-2003 12:42pm
    #1
    Registered Users, Registered Users 2 Posts: 10,339 ✭✭✭✭


    more than likely a long and complicated answer :)

    me = linux newbie, recently travelling from a windows environment.

    the problem: when I set up apache to host a website, there's no problem. I can have a look at www.example.com fine.

    However, when I try to add a virtualhost stanza for www.example1.com httpd will not restart, no error message, nothing in the error logs (except child (some number) does not exist). I am using named virtual host. Should I be including ports in the ip address and a listen entry?

    Anyone know a decent step by step that coners named.conf as well? (in particular the relationship between them and the lookup database files - mine are imaginatively titled db.example.com and db.example.com.rev).

    I am pretty sure this can be done graphically through the Redhat GUI but it is part of a course and we have to do it all with vi, Im not really asking for homework help, I'm just getting very pissed off and falling behind the rest as they head off on squid and ftp :(


Comments

  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    It sounds like your httpd.conf is missing something. Have you tried to run the syntax check before restarting?
    The syntax should be something like:
    <VirtualHost 217.xxx.xxx.xxx>
    ServerName www.somedomain.com
    DocumentRoot /xxx/xxx
    ServerAlias somedomain.com
    </VirtualHost>

    If you look inside the default httpd.conf that comes with Apache a lot of the directives are well commented.
    The easiest way of controlling your Apache and Bind config would be through webmin (http://www.webmin.com/). It's not a complete replacement for the command line, so you still need to know what you are doing before you start 'playing' with it.


  • Registered Users, Registered Users 2 Posts: 10,339 ✭✭✭✭LoLth


    thanks, I know I have everything you listed except for ServerAlias. I'll have a look at that when I get a chance. (though it sounds familiar, if it is in the template that comes with httpd then Im pretty sure I didn't delete it).


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    ServerAlias is just an alternative hostname. Try running httpd -t and httpd -T and see what they spit out. And post the config for chuff's sake. :)

    adam


  • Registered Users, Registered Users 2 Posts: 10,339 ✭✭✭✭LoLth


    I'm posting from my pc in work so I dont have the config handy. I'll post it when I get to the linux box again :)


  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    One possibility is that you have error_log and access_log for the vhost setup to be in a directory that either doesn't exist or apache hasn't permissions to access.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 10,339 ✭✭✭✭LoLth


    just thought I'd follow up on this.

    turned out that I had a typo.... right at the very end I had the website typed wrong,

    it should have been www.example1.com.... instead I had www/example1.com

    you have no idea how much grief that has caused me :(

    Is there a way to error check a configuration file for stupid mistakes like that?

    ps. sorry to drag up an old post, but I thought it best to clarify what was wrong in case someone had the same problem.


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Syntax errors should be highlighted (error on line...) when you restart, but sometimes the 'service' wrapper doesn't pick up on them. However, testing with httpd -t and httpd -T should show them up.

    adam


  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    Of course it's also a lot easier to debug the problem if you have the offending section of the httpd.conf to look at ;)


Advertisement