Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm been tasked with the job of moving a web site from one server (off site) to another server (in our LAN). I've tarballed up all of the files, moved them to our local server, did a db dump, imported all of the db data to the local mysql db, and added the users that it used on the remote server.
I can connect to the db no problem, with all of the user types, and if I create any php (or html) file and dump it into the doc root folder it servers fine. However, ALL of the files that I've copied over give out 403 (forbidden access) errors. Index.php, subfolder files, etc
I've been googling around and it seems as if all of the fixes suggested don't seem to work. I've chmoded to 777 (recursive), I've chowned to root:root (again recursive) and apache:apache, both to the document root folder and its content files. Nothing seems to be working. No matter what I change I always get the 403.
Thanks for reading, any help/ideas to try would be awesome
Could you tell us the location of the files, and where they are needed? You may have to specify the full path to the files, or reconfigure your configuration to point to them if all of the permissions are properly set up how they are supposed to be. I also recommend clearing your cache of your browser just to rule that out.
Could you tell us the location of the files, and where they are needed? You may have to specify the full path to the files, or reconfigure your configuration to point to them if all of the permissions are properly set up how they are supposed to be. I also recommend clearing your cache of your browser just to rule that out.
Cheers,
Josh
Hi
I created and dumped the files in the folder /var/www/html/george. This is the exact same path that was used in the remote server. Due to this purposeful similarity I didn't think that I would need to change any of the code. I'll try clearing the cache quick too. Thanks for your help
also I've noticed that when I view the site it gives me the default Apache/CentOS Test Page, even though in httpd.conf I have:
Code:
DocumentRoot "/var/www/html/george"
and
Code:
<Directory "/var/www/html/george">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options +Indexes FollowSymLinks +ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride AuthConfig FileInfo
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
and
Code:
DirectoryIndex index.php index.html.var
what the heck??!!
it wont load the index.php page until I specifically say my.ip.ad.dr/index.php in the browser.
do I have apache configured wrong?
I had a similar problem, turned out to be SELINUX related, not sure if you're making use of that or not.
omg, I completely forgot about se, and I never saw any mention of that in anything else I read. Set it to disabled, rebooted, now it works fine. Thank you so much, I can't believe I spaced that out
omg, I completely forgot about se, and I never saw any mention of that in anything else I read. Set it to disabled, rebooted, now it works fine. Thank you so much, I can't believe I spaced that out
Thank you everyone!
Big sigh
From a security point of view, disabling SELinux is the same as uninstalling it. If you want to keep SELinux installed, you may want to create a local policy for apache and/or httpd. If you want to go this route, let me know, and I will run you through on how to do it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.