Corrupted httpd.conf

Hey all,

Somehow, my httpd.conf has become corrupted.

Could someone please post the contents of theirs? I can’t access my dashboard or anything now and I hesitate to restart the device - not sure what a broken httpd.conf will affect other than apache…?

I’m referring to:

/usr/local/apache2/conf/httpd.conf

So if one of you with SSH access to your device would be so kind…I would really appreciate it!

Dave

Note, this is a Gen2, not Gen1. Firmware version 2.30.172
Note also that the IP address is added to the config in several places where I’ve noted <yourip/mask>

So it’s of the format

Require IP x.x.x.x/yy
like
Require IP 10.10.10.10/24

Finally, I didn’t include MY shared secret (xxxxxxxxx) below, hopefully that’s not part of your corrupted config.

ServerRoot "/usr/local/apache2"
Define ACCESS_LOG_FILE access.log
Include conf/mods-enabled/*.load
Include conf/mods-enabled/*.conf
Include conf/extra/*.conf

DocumentRoot "/var/www/"


EnableSendfile on
IncludeOptional conf/sites-enabled/*.conf


<IfModule auth_token_module>
        Alias /sdownload /mnt
        <Location /sdownload/>
                AuthTokenSecret       "xxxxxxxxx"
                AuthTokenPrefix       /sdownload/
                AuthTokenTimeout      7200
                AuthTokenLimitByIp    off
        </Location>
</IfModule>

<Directory />
        AllowOverride All
        Options FollowSymLinks
        AuthType None
        <If "(%{IPV6} != 'on') && ((%{REQUEST_URI} !~ m#\A\/api\/[0-9.]+\/rest\/.*#) && (%{REQUEST_URI} !~ m#\A\/test.html#))">
                        <RequireAny>
                                Require local
                                Require ip <yourip/mask>
                        </RequireAny>
        </If>
        <Else>
                <RequireAll>
                        Require all granted
                </RequireAll>
        </Else>
</Directory>

<Directory "/var/www">
        Options +FollowSymLinks -MultiViews -Indexes
        AllowOverride All
        AuthType None
        <If "(%{IPV6} != 'on') && ((%{REQUEST_URI} !~ m#\A\/api\/[0-9.]+\/rest\/.*#) && (%{REQUEST_URI} !~ m#\A\/test.html#))">
                <RequireAny>
                        Require local
                        Require ip <yourip/mask>
                </RequireAny>
        </If>
        <Else>
                <RequireAll>
                        Require all granted
                </RequireAll>
        </Else>
</Directory>

<Directory "/mnt/HD/HD_[a-z]+2">
        Options +FollowSymLinks -Indexes
        AllowOverride None
        AuthType None
        <If "(%{IPV6} != 'on') && ((%{REQUEST_URI} !~ m#\A\/api\/[0-9.]+\/rest\/.*#) && (%{REQUEST_URI} !~ m#\A\/test.html#))">
                <RequireAny>
                        Require local
                        Require ip <yourip/mask>
                </RequireAny>
        </If>
        <Else>
                <RequireAll>
                        Require all granted
                </RequireAll>
        </Else>
</Directory>

<Directory "/var/www/cgi-bin/">
        Options   +ExecCGI -MultiViews +FollowSymLinks -Indexes
        AllowOverride None
        AuthType None
        <If "(%{IPV6} != 'on') && ((%{REQUEST_URI} !~ m#\A\/api\/[0-9.]+\/rest\/.*#) && (%{REQUEST_URI} !~ m#\A\/test.html#))">
                <RequireAny>
                        Require local
                        Require ip <yourip/mask>
                </RequireAny>
        </If>
        <Else>
                <RequireAll>
                        Require all granted
                </RequireAll>
        </Else>
</Directory>