Cannot Locate .htaccess - apache

Good morning team,
I need help, I'm in charge of a Web server CENTOS handling the web of my work is a little disorganized and access to the site is restricted by http, I need to add users so that they can authenticate to the site but I can not find the .htaccess file, I've tried everything [locate, find, updatedb, ls -a, etc ...] I need your help please.
Capture of the root folder of the portal:
root folder
Here a capture of the passwd file:
passwd file

Related

How can I fix my homepage showing a 403 error?

I keep getting a 403 error on my homepage, despite having all my permissions set to allow public to read. I'm not using any plugins, I'm not using Wordpress, and though my site is routed through Cloudflare it goes through to my hosting provider's 403 page (I haven't created my own). I've tried 755 and 644 and I keep getting the same thing. How can I fix this?
(The website is alexbelman.com)
There are several possible reasons depending on your hosting environment and a bit more detailed info from you about your hosting setup would help. For example - is your site on a server running Linux? cPanel?
But maybe this info can help you in the meantime:
If you're sure you have the correct permissions on folders (in most cases your public_html folder should be 750, all folders within the public_html folder in most cases should be 755, and files should be 644) then probably the first two things I would check would be:
Make sure you have an index file in your public_html folder - some examples would be index.html , index.htm , index.php , or on some hosts a default.html is used. If there is no index file in the folder that serves your site, server security configs will often present a 403 while protecting the sensitive contents of your hosting account from being viewed.
If you're sure you have an index file in your public facing folder, then check the contents of the .htaccess file in your public_html folder, since an errant rule or line of code in your htaccess is a common cause for a 403
If you can post the contents of your .htaccess file here someone here or possibly myself can spot anything that shouldn't be there or is incorrect.
Also, since you're using CloudFlare you should take a look at their Quick Fix suggestions here - https://community.cloudflare.com/t/community-tip-fixing-error-403-forbidden/53308

Put right permission - owner/group to public_html folder

I'm new to WHM, cPanel, and CentOS.
I install WHM then create an account for domain app.example.com and user peter
I point the domain name to right IP address but when I run my website app.example.com I got HTTP ERROR 500
Via SSH I log into the server and I find my previous uploaded code into
/home/peter/public_html
Then I run command sudo chown -R peter:peter /home/peter/public_html
and when I look at folders permission and owner they looks like:
I think my HTTP ERROR 500 is about user permission.
Can please help me to add right privileges to a user or what I need to do to my public_html folder be visible to the world (at browser).
What I need to do?
The best thing to know if it's a permissions problem, a bug in the programming of the web application or to see what really happens, is that you look at the log file of the web server (apache, nginx, the one you use). The log will give you more clues. Could you copy the log output when the error occurs?
It seems some required extensions were not activate or had been removed from your VPS. You should check and install/activate them. Then you can test your website again.
P.S: Sorry for my bad english

XAMPP: How to make apache webserver owner of folder /htdocs

I am using XAMPP and apache as webserver. I have permission problems with a website of mine that requires write access to a temporary folder in the project folder /htdocs/myProject/tmp
It think my problem is that my site runs on my localhost and I copied the project with my regular desktop user into the htdocs folder. Apache seems to lack write permissions.
My question is now: How do I found out which user group apache belongs to in order to make that group owner of the folder? That should fix my permission problem, shouldn't?
As far as I understand, the Apache (Webserver) has an own user called "www-data". Maybe an already answered question on SO has a solution, which you can use.
The used command relies on a linux-based system and that you navigated in a terminal to a directory, where /htdocs is located.
This command in the answer of the link below allows you as a humanoid user to write and work in this specified directory.
You add www-data (Apache) to use this directory, too.
New files of that chown'ed directory will 'inherit' the owners.
The Link and further descriptions can be found here on Stackoverflow.com:
www-data permissions

Install Symfony on remote server

I'm trying to evaluate Symfony 2 (2.1.7). I'm installing it following the download instructions on an EC2 instance that is already running PHP 5.3.20 on Apache.
I'm stuck on the second step of the README.md: "Access the config.php script from a browser". The readme assumes a local installation and provides a sample URL to the localhost: http://localhost/path/to/symfony/app/web/config.php.
Since I'm on a remote server, I try to access the config.php file using the relevant URL: http://mysite.com/Symfony/app/check.php, which returns this message:
Forbidden
You don't have permission to access /Symfony/app/check.php on this server.
I tried to apply the answer from How do I access to symfony config.php remotely? by adding what PHP reports back as my REMOTE_ADDR, but that doesn't change the message.
What do I do now?
In symfony, the web folder is supposed to be your webroot. So, if you want to access \project\web\config.php, you should point your browser to http://www.example.com/config.php.
If that doesnt work, apache is probably configured incorrectly. make sure it it is pointed at your web directory, not your project directory.
edit As you mention in your question, you will also need to edit the config.php file to allow remote access. You can comment those lines out, or add your IP to the whitelist.
edit2 Many webhosts don't allow you to specify your webroot. In that situation, you can put the Symfony files in a different directory and create a symlink between the Symfony web directory and your webroot.

ProFtpd Homedirectory per user

I So new to linux Ubuntu and moving from windows.
The problem I have is related to ftp. This is what I am trying to do.
My websites are located in /var/www. Each website has its own root for examle
/var/www/site1
/var/www/site2
This is what I am trying to do. I would like to have a user for each site (directory) so they can access their home directory through ftp.
Looks so easy, but can't make it work. Any help or direction is appreciated.
If you want a user per site you might need to create virtual hosts in apache so that instead of the sites being located in /var/www they will be located in the user's home directory.
You can then allow users to access their home folders via ftp. These are instructions that are available on the Ubuntu site. Access them here
alternatively you can add the users as FTP users with the right permissions to the folders located under /var/www/ . Documented well in the ProFTPd website.
There's an old post here that you might still find helpful