How to check if mod_alias is enabled?

812

Solution 1

You can check if mod_alias is enabled by using the following command:

~$ apache2ctl -M | grep alias

If it's enabled, it will give you the following response:

 alias_module (shared)
Syntax OK

You can also check manually the file which is loading the module:

~$ cat /etc/apache2/mods-enabled/alias.load 

If it's enabled, it will give you the following response:

LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so

Solution 2

You can try listing all active modules with one of these:

apachectl -t -D DUMP_MODULES

or

httpd -M

Also, check if the module is commented out in the httpd.conf file:

cat /etc/httpd/conf/httpd.conf | grep LoadModule
Share:
812

Related videos on Youtube

Nizzy
Author by

Nizzy

Updated on September 18, 2022

Comments

  • Nizzy
    Nizzy almost 2 years

    I have a gatsby page which has 2 columns of equal width, a header on top, and a footer at the bottom. I have some content in the left column and an image in the right column. I am using graphql to query an fluid image. I set the maxWidth property but when the page loads, the image is still of original size, roughly 700 x 800. Any help in what is causing this would be greatly appreciated as i am still new to gatsby. Thank you.

    const About = (props) => {
      return (
        <Layout>
          <Row className={aboutStyles.padding}>
            <Col>
              <h1 className="text-center">Test Page</h1>
              <div>
                <p>This is the left column</p>
              </div>
            </Col>
            <Col>
              <Img fluid={props.data.dumpTruck.childImageSharp.fluid} />
            </Col>
          </Row>
        </Layout>
      )
    }
    
    export default About
    
    export const pageQuery = graphql`
      query {
        dumpTruck: file(relativePath: { eq: "dumpTruck.jpg" }) {
          childImageSharp {
            fluid(maxWidth: 400) {
              ...GatsbyImageSharpFluid
            }
          }
        }
      }
    `
    
    • ksav
      ksav over 4 years
      Do you need more help with this question?
    • Nizzy
      Nizzy over 4 years
      I have moved on from Gatsby/GraphQL as I wasn't able to resolve this.
  • Knocks X
    Knocks X over 10 years
    Hi, Gabriel. I am getting '-bash: apachectl: command not found'. Nevermind, the 'httpd -M' command worked
  • Knocks X
    Knocks X over 10 years
    When running 'cat /etc/httpd/conf/httpd.conf | grep LoadModule' I am getting 'LoadModule bwlimited_module modules/mod_bwlimited.so'
  • Knocks X
    Knocks X over 10 years
    -bash: apache2ctl: command not found
  • Knocks X
    Knocks X over 10 years
    cat: /etc/apache2/mods-enabled/alias.load: No such file or directory
  • Knocks X
    Knocks X over 10 years
    -bash: LoadModule: command not found
  • Theofilos Papapanagiotou
    Theofilos Papapanagiotou over 10 years
    you can try httpd -M | grep alias
  • Knocks X
    Knocks X over 10 years
    httpd -M | grep alias Syntax OK alias_module (static) - Does that mean it's on?