title: Fresh Wordpress Install: "Sorry, you are not allowed to access this page."
body: <p>Just installed a wordpress blog. Didn't add any plugin or theme yet. Completed the initial setup (choose language -> set user ...)</p>
  
  <p>So I log in using the credentials created in the setup and works. I can log in. I can also see that the user I used to log in is the admin because I can see the "admin toolbar" when I go to my blog.</p>
  
  <p>But when I go to <code>/wp-admin</code> or any other admin links I get a <code>Sorry, you are not allowed to access this page.</code></p>
  
  <p>A little background about what I am trying to do. I have installed this wordpress on a virtual server(<strong>Server A</strong>) with nginx.</p>
  
  <p>Then I used another virtual server(<strong>Server B</strong>) as reverse proxy, using nginx.</p>
  
  <p><strong>Server B</strong>'s nginx server .conf file has a location block <code>/blog</code> which <code>proxy_pass</code>'s to <strong>Server B</strong>. Server B also redirects all traffic to https.</p>
  
  <p>To get this setup to work, I had to make some edits in the <code>.wp-config.php</code> file. </p>
  
  <pre><code>$_SERVER['REQUEST_URI'] = str_replace("/wp-admin/", "/blog/wp-admin/",  
  $_SERVER['REQUEST_URI']);
  $_SERVER['HTTPS'] = 'on';
  
  define( 'WP_SITEURL', 'https://example.com/blog' );
  define( 'WP_HOME', 'https://example.com/blog' );
  </code></pre>
  
  <p>I also had to add some code to the current theme's <code>functions.php</code> file.</p>
  
  <pre><code>update_option('siteurl','https://example.com/blog');
  update_option('home','https://example.com/blog');
  </code></pre>
  
  <p>Everything works fine, except I can't get access to the admin section.</p>