Skip to content

Instantly share code, notes, and snippets.

View kosciCZ's full-sized avatar

Jan Koscielniak kosciCZ

View GitHub Profile
@bladeSk
bladeSk / laravel-on-shared-hosting-htaccess.md
Last active March 5, 2024 09:51
Deploying Laravel on a shared hosting using only .htaccess

Deploying Laravel on a shared hosting using only .htaccess

Making Laravel work on a shared hosting can be troublesome, because Laravel needs to have its document root set to the public directory. This may not be configurable by a user or even desirable, when the server is hosting multiple websites.

Here's a simple method using only a .htaccess file placed in Laravel's root directory - e.g. alongside app, bootstrap, config, ... No changes whatsoever are necessary to your code.

The file rewrites all the requests so that requesting /file.png would in fact return /public/file.png and anything else is routed to /public/index.php. This also ensures that nothing outside the public folder can be accessed, thereby protecting any sensitive files like .env or database/*.

The simple method

@tori3852
tori3852 / rstudio.sh
Last active March 4, 2021 17:26
Install RStudio on Fedora
sudo dnf install -y $(curl -s https://rstudio.com/products/rstudio/download/ | grep "fedora" | grep -o "\"[^ \"]*x86_64.rpm\"" | sed "s/\"//g")
@melvincabatuan
melvincabatuan / latex install
Created August 25, 2015 23:45
Centos 7 latex install
yum -y install texlive texlive-latex texlive-xetex
yum -y install texlive-collection-latex
yum -y install texlive-collection-latexrecommended
yum -y install texlive-xetex-def
yum -y install texlive-collection-xetex
Only if needed:
yum -y install texlive-collection-latexextra