Wordpress Reinstallation - You don't have permission to access /sitename/ on this server - html

We've been working hard on a sandbox server. We installed WordPress to it from scratch. I created the database, and imported the previous database into it. The user and password both have been created.
Right now, our error is "403 Forbidden: You don't have permission to access / on this server". I can't access any of the files by typing in the server IP address,though we see and control everything as root via Putty, or manage it through FileZilla. Root is the owner of all WP files/folders.
I found this source: WPBeginner-403-Error-Fix and am currently changing the permissions on the files; the folders are done and the permissions are set to 755. File permissions are being set to 644. Out of all the resources we had referred to, it never mentioned WP requiring specific permissions. I got right onto that today. While this is running, I still get the message after the folder permissions were changed, and as the file permissions are being processed:
You don't have permission to access /wp-admin/login.php on this server.
We also had a bootstrap file located in the same place as the WP installation / contents (this was a test). The bootstrap is very much accessible: the CSS/JS folders with the supporting content can be seen if you type the ipaddress/directory for the bootstrap version... you can see the files and structure. If you type in ipaddress/boot.html, it runs it flawlessly. If we try referring to anything with WP, it does not like it and throws the 403 error.
There is no .htaccess, I read online it would generate via permalinks in the panel. But we can't even see the panel. It's currently .htaccessOLD (from when we imported our old WP contents to the dev server, from the production site), so there should be no interference.
None of us has installed WP directly, the guy who did it previously no longer is part of the company, so we are becoming lost in this process.
Edit: Plugins were disabled via renaming convention, however, WP actually regenerated this folder.
Edit (2): With the permissions set, and the plugin/theme deactivated, it still does not run due to 403.

Weird... my answer didn't post yesterday as I had thought.
So- we solved it. The permissions were set accordingly for all directories/files, the issue was the server configuration. Just triple check the server configuration file (usually httpd.conf on current servers) to ensure it points to the directory containing the WP contents.
If this is still a problem to some people, and you swear that the httpd.conf file is correct, it does not hurt to double check your directories. The directories should be permission 755. Files should be 644, excluding the wp-config.php (that ought to be set for permissions 455).
Thank you for helping us troubleshoot! We really appreciated it! :)

Related

Can not display drupal console and phpmyadmin on local host at same time

I am absolute beginner on Drupal, and nearly that on setting up localhost on my Mac along with MySql. My problem is I can't display Drupal and run phpmyadmin on separate tabs in my browser at the same time. I found that changing the 'AllowOverride' parm in my http.conf file will allow one or the other to work, but not both at the same time.
So in etc/apache2/httpd.conf <Directory "/Library/WebServer/Documents"> section:
If use 'AllowOverride None'
Can get to http://localhost/phpmyadmin/index.php
Cannot get to http://localhost/user/login (get 'The requested URL /user/login was not found on this server')
If use 'AllowOverride All'
Can not get to http://localhost/phpmyadmin/index.php (get 'You don't have permission to access /phpmyadmin/ on this server.')
Can get to http://localhost/user/login
Any ideas?
AllowOverride should be set to "All" since that way you are allowing .htaccess file to work properly (i.e. do redirections and make pretty urls work).
If phpMyAdmin is not working with that setup that means that Drupal's .htaccess rules are catching your requests to phpMyAdmin. That probably means that you installed Drupal directly inside web root and phpMyAdmin inside it's one directory (as a sub-site of Drupal). So even you are calling phpMyAdmin Drupal jumps in and takes control of that request.
One solution would be to install Drupal inside it's own directory, so you could access your project as i.e.
http://localhost/drupal
That way Drupal's .htaccess file will be inside drupal dir and not in web root dir.
Other solution would be to create virtual hosts, so depending on used domain web server would know which site to display (to serve request from which directory).

Why do I get a 500 internal server error when trying to access an html file in public_html using cPanel/godaddy?

I have a godaddy website hosted through cPanel, but the html file, named test.html, will not appear when searching "website_name"/test.html. This is the contents of the file:
<!DOCTYPE html><head></head><body>TEST</body></html>
There is no .htaccess, although permissions are set to 644. The server displays the 500 error regardless of whether a valid address was entered. Additionally, the DNS domain and the actual ip address show different things: The DNS shows an index page I can't find in my public_html, whereas the ip shows the godaddy "Future home of something quite cool." message.
Background: I inherited this project as part of a new job. I can set up an apache server with php and mySQL support (in fact I went from using an xampp install to just running everything from command line for practice), but my employer has two godaddy domains: one made using a website building, and one using cPanel for which I am to write my own HTML, CSS, php, js, etc. I have searched extensively across godaddy, google and stack exchange, and have found nothing so far that has worked. The cPanel File Manager has a couple files in it, but nothing will open as a url (I can edit the files though). I checked the godaddy documentation and follow the tutorials and nothing has helped. Any help is appreciated. As an aside, I’m wondering if it would just be easier to completely restart the whole process? The html/css/php files are kind of a hodgepodge and would require rewrites anyway, and bootstrap is used as a source file in every one but never actually implemented. The environment is very relaxed so long as I’m working on something productive.

Hosting basic html site on iis

I have a basic web site (just html, js and css files) that I want to host on IIS on my local machine for testing purposes. The site runs fine when I run it directly as a file on my computer. I added a website on IIS, using the directory these files are located in, but when I try to launch it, I get an error page that says:
An error occurred loading a configuration file: Failed to start monitoring changes to '[my site path]' because access is denied.
It then says that the source file is a web.config. I know that ASP.NET sites use a web.config, but I don't even have one, and I just want to run a basic site using html, css, and javascript.
Any ideas on what the fix might be? I made sure I have an application pool for the site.
You likely put it into your user profile -- ie c:\users\skitterm\ -- which won't let the process running IIS read the folder. You are better off using IIS' built in directory structure in c:\inetpub and adding a folder for your site.
As you can tell this is a server misconfiguration. It would help to know the version of your IIS.
You can follow the steps on Microsoft's official knowledgebase to resolve the issue:
http://support.microsoft.com/kb/316721
http://support.microsoft.com/kb/317955 (for IIS v6.0, try Method 3)
I worked in IIS about a year ago and such errors are caused by misconfigured Security settings in IIS.
Sounds like you need to set up the proper access rights for the folder to the account specified by the application pool identity.
First make sure that your folder is not anywhere under your \users\, \program files\, or any other place that already has restricted access. Put it under a folder on the root (\inetpub is a good place).
Then, add the appropriate permissions (usually read only) for the folder to allow the user account specified by the app pool identity to access it. If the app pool identity is set to ApplicationPoolIdentity, adding the IIS_IUSRS local group should do it. Otherwise, use the account that is specified.
This should fix the problem.

Manually installing wordpress on Godaddy, system cannot find the path specified

I am manually installing wordpress on a client's godaddy account. The client has requested I do not install it in the root folder, so it is has been uploaded via cyberduck in it's original wordpress folder. I created a MySQL database and changed the config_sample.php to config.php with all the appropriate information (database username and password).
I cannot complete the final step of the installation. When I go to website.com/wordpress/wp-admin/install.php it says "system cannot find the path specified". I think the website recognizes that wordpress is there somewhere because it is not a "missing page" message, but I'm not really sure what is the problem.
Is there something I need to do to the godaddy account to make it work? Or can wordpress only be installed in the root folder? Or does the IIS need to be updated to IIS7? Any help would be much appreciated!

MAMP - suddenly getting 404s on my localhost

I have a very simple MAMP setup, with my index.php and related files in my htdocs folder. I was rolling along fine last night, being able to access the files by typing in things like localhost/index.php. Now, all of the sudden, I get 404s (file not found on this server) when I try to connect to any of the pages that are in my localhost folder or subdirectories of it.
What's more, when I just type in localhost, it shows me some of the directories but DOES NOT show any of my .php files, even though they show up when I perform a ls in the command line.
My MAMP app shows that I am connected to my Apache/MySQL servers. I can still access the localhost/MAMP homepage. But for some obscene reason, all of the sudden my php files are inaccessible. I have changed nothing inside of them! What's going on?
Edit: Turns out I needed to change the permissions of my php files -- they were set to read and write only for sudo and read only for everyone else. I ran chmod 777 on the applicable files and things were back to normal, but this begs several questions:
Why was it working earlier then changed without me ever modifying the file permissions?
Why should I have to make it writeable for other users to be able to access it on my local host as the admin user?
If I were to deploy this code in the wild (I know MAMP isn't used that often in the wild, but still), what would I do? Wouldn't creating these kinds of permissions result in serious security holes?
EDIT 2: Aaaaaand now it's not working again. Again, no changes made to file preferences, etc., just a few tweaks to the actual php files themselves. I don't have any sharing enabled under my sharing settings in System Preferences... this behavior is really starting to become frustrating.
Open Activity Monitor and make sure all instances of Apache and MySQL are closed. Sometimes MAMP has a tendency to not actually quit those processes and the next time you start it up they're still running and it generally messes with things (how's that for a technical explanation?).
Make sure there isn't any other process that's trying to use localhost for any reason. I came across this problem with POW installed. The POW process had stopped responding and it ended up interfering with MAMP's Apache.
Make sure that MAMP's settings haven't somehow been changes. I've seen MAMP revert custom document roots for seemingly no reason which can cause this.
I'd say even before any of this open your system preferences and make sure your Mac's own built-in Apache is off. You'll be able to see this in the Sharing section (it looks like its been moved in Mavericks however).
Make sure you're not routing traffic through a VPN or SSH using Sidestep. I had this problem after going back to an old project I built with MAMP while working from a coffee shop.