public-html

Is it unsafe to keep a Laravel project files inside public_html?

别说谁变了你拦得住时间么 提交于 2021-02-19 04:33:27
问题 I have 3 different laravel projects inside public_html (that is, one level below) on a shared hosting. I changed each domain/subdomain document root path to point to the respective project/public folder (i.e. public_html/project1/public) Additionally I put the Options -Indexes statement in my .htaccess files so people can't browse directly into my project files, and denied all access to .env files. Is there still a vulnerability doing this? 回答1: I assume that when you mention public_html,

How to properly create an SVN repository that is accessible via http? (inside public_html)?

让人想犯罪 __ 提交于 2019-12-10 18:25:54
问题 Here's the situation: subversion is already installed in the server and I have access to one of the shared accounts in the server (not the root), and this shared hosting account has SSH access. I want to create a repository where I can commit the PHP files i'm working on, and when I commit it should be viewable in a browser that is why I was thinking of creating the repository folders inside public_html is this a correct way to do this? How about the security of the server? If not what is the

How can I make a public HTML folder in Ubuntu?

强颜欢笑 提交于 2019-12-09 04:32:34
问题 Simple question, but for some reason I couldn't find the exact answer on Google: I have a fresh Ubuntu install on Slicehost, and would like to make a public directory in my home dir for a simple website containing a bunch of static HTML files. How do I do this? Is it just a matter of typing mkdir public_html and setting the permissions, or is there a cleaner way? (I remember in the past I've had issues where every time I copied a file into my public_html directory, I would have to manually

How to invoke a php file that is located outside public_html

我是研究僧i 提交于 2019-12-06 06:43:40
问题 Im creating a website and i am very OCD when it comes to security so i heard that if you store all of your .php files outside of your public_html folder and invoke them with another .php file that is inside your public_html folder then your risk of an attack is lower. Is this true, if so how would i do this. I read something about using .htaccess but I'm not sure if that was the correct way to do it. I though i could maybe use include but im not sure how include works with parameters. 回答1:

How to invoke a php file that is located outside public_html

浪尽此生 提交于 2019-12-04 12:32:33
Im creating a website and i am very OCD when it comes to security so i heard that if you store all of your .php files outside of your public_html folder and invoke them with another .php file that is inside your public_html folder then your risk of an attack is lower. Is this true, if so how would i do this. I read something about using .htaccess but I'm not sure if that was the correct way to do it. I though i could maybe use include but im not sure how include works with parameters. There isn't a huge amount of extra protection offered by this strategy. Mainly, it ensures that if your server

How can I make a public HTML folder in Ubuntu?

你说的曾经没有我的故事 提交于 2019-12-03 01:16:01
Simple question, but for some reason I couldn't find the exact answer on Google: I have a fresh Ubuntu install on Slicehost, and would like to make a public directory in my home dir for a simple website containing a bunch of static HTML files. How do I do this? Is it just a matter of typing mkdir public_html and setting the permissions, or is there a cleaner way? (I remember in the past I've had issues where every time I copied a file into my public_html directory, I would have to manually set its permissions, which was quite frustrating.) rz. Assuming you've already installed apache, do the

How to get the absolute path to the public_html folder?

爱⌒轻易说出口 提交于 2019-11-28 06:21:55
$_SERVER['DOCUMENT_ROOT'] returns /usr/local/apache/htdocs/ is there a way to get /home/user/public_html/ The problem is that I have to write a script which can be in the public_html folder or a sub-folder of the public_html folder. The script should save uploaded files into a folder inside public_html directory(say images). In other words let us say that my file is test.php and the path to it is /home/user/public_html/test/test.php. And there is a folder /home/user/public_html/images where files uploaded via test.php have to be saved. I don't know where the test.php file will be run. For

How to get the absolute path to the public_html folder?

你。 提交于 2019-11-27 01:16:59
问题 $_SERVER['DOCUMENT_ROOT'] returns /usr/local/apache/htdocs/ is there a way to get /home/user/public_html/ The problem is that I have to write a script which can be in the public_html folder or a sub-folder of the public_html folder. The script should save uploaded files into a folder inside public_html directory(say images). In other words let us say that my file is test.php and the path to it is /home/user/public_html/test/test.php. And there is a folder /home/user/public_html/images where