Results 1 to 9 of 9

Thread: Apache2 Configuration Confusion

  1. #1

    Default Apache2 Configuration Confusion

    So, on many other Linux distros you enter following

    Code:
    #
    # apcupsd configuration file for Apache Web server
    #
    
    # files are off the documentroot of Web server
    Alias /apcupsd /var/www/apcupsd
    <Directory /var/www/apcupsd>
        AddHandler cgi-script cgi pl
        Options ExecCGI
    </Directory>
    
    #
    # Allow only local access at default
    # Change the ".example.com" to match your domain or modify
    # access rights to your needs to enable remote access also.
    #
    <Directory "/var/www/apcupsd">
        DirectoryIndex upsstats.cgi
        AllowOverride None
        Options ExecCGI Indexes
        Require all denied
    </Directory>
    into httpd.conf. But in OpenSUSE has different configuration. Now I am confused if I have my own configuration like this should it be in vhosts.d or conf.d directory? Reason for confusion is APCUPSD's Apache2 configuration files are in conf.d and in documentation it says these entries should be in vhosts.d?

    https://doc.opensuse.org/documentati...manually.vhost

    By the way tried puttion data.conf (custom directory access) to conf.d and vhosts.d and it works both ways, but my question is which one is more appropriate to use in this case?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,068

    Default Re: Apache2 Configuration Confusion

    I assume it depends if you have vhosts or not. Of course when you have only one "host", you can handle it as a vhost. I never did.

    But this might be a too simplistic approach of mine.
    Henk van Velden

  3. #3

    Default Re: Apache2 Configuration Confusion

    @hcvv
    I do appreciate your answer but I would like to know exact reasoning behind this or in other words what are vhosts.d and conf.d for? I do like OpenSUSE and have been using it for 10ish years, but there are things that are not well documented and are confusing people, and me as well and this is one of those weird occasions. I do also understand that they did this for ease of maintenance, but please help me understand what is for what.

  4. #4
    Join Date
    Sep 2012
    Posts
    4,788

    Default Re: Apache2 Configuration Confusion

    Quote Originally Posted by grc View Post
    APCUPSD's Apache2 configuration files are in conf.d and in documentation it says these entries should be in vhosts.d?
    https://doc.opensuse.org/documentati...manually.vhost
    I do not see this page mentioning APCUPSD at all so I do not understand how you came to this conclusion.

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,096
    Blog Entries
    14

    Default Re: Apache2 Configuration Confusion

    I know that a friend replaced /var/www/html by a symlink of the same name to /srv/www/htdocs, to be able to reuse the configs he had on another distro. He needed some modules to load with apache but that was about it IIRC.

    I would first find out where apcupsd lives ( not in /var/www/apacups I think ). If you use vhosts and need it for one of them, then put it in a vhost's .conf, if it's for the default server, I'd put it in it's own apcupsd.conf in conf.d . Both ways the setttings will be read by apache. But, this depends on your setup.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6

    Default Re: Apache2 Configuration Confusion

    Ok, I think I might confuse you as well. In documentation it says for conf.d "Configuration files added by other modules", and for virt.d it says "Your virtual host configuration should be located here". So where do files created by user with <Directory></Directory> directives go? In other words were should I put my data.conf? Into virt.d or conf.d or somewhere else? Apcupsd is added by installing apcupsd-cli and int is in conf.d because it is a module, php7.conf is also there because it is installed by apache2_mod-php7 or something similar. I hope I have cleared confusion my question is where do I put data.conf?

  7. #7
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,096
    Blog Entries
    14

    Default Re: Apache2 Configuration Confusion

    Use YaST http server module, create a vhost using ( amongst other things ) the data from your conf file. AFAIK they should land in vhosts.d
    Now, if you would want this to be part of the defaults, then create a conf file in conf.d
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,096
    Blog Entries
    14

    Default Re: Apache2 Configuration Confusion

    OK, last attempt, since it doesn't seem clear.
    Let's suppose you have a webserver with 10 vhosts. If you want the module to work for all of them, create a conf file in conf.d ( what's in there is for the apache server, so for all vhosts ). If only one of them needs the module, put it in the conf in vhosts.d
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  9. #9

    Default Re: Apache2 Configuration Confusion

    Quote Originally Posted by Knurpht View Post
    OK, last attempt, since it doesn't seem clear.
    Let's suppose you have a webserver with 10 vhosts. If you want the module to work for all of them, create a conf file in conf.d ( what's in there is for the apache server, so for all vhosts ). If only one of them needs the module, put it in the conf in vhosts.d
    Thank you this works and this is great explanation!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •