Skip to content

Instantly share code, notes, and snippets.

@temamawelu
temamawelu / nginx-php-windows-setup.md
Created September 30, 2024 04:40 — forked from odan/nginx-php-windows-setup.md
Nginx and PHP Setup on Windows

Nginx and PHP Setup on Windows

For local development you could also use Nginx with PHP as an replacement for XAMPP.

Install Nginx

@temamawelu
temamawelu / WampHTTPS.md
Created January 14, 2023 14:36 — forked from danieldogeanu/WampHTTPS.md
How to enable HTTPS for WAMP Server.

After you've downloaded and installed WAMP Server, follow these steps:

  1. Generate SSL certificate using OpenSSL:
  • Add C:\wamp64\bin\apache\apache2.4.27\bin directory to the PATH so you can access openssl command from the command prompt (WAMP comes with its own version of OpenSSL already integrated, so you don't need to install it. You'll find it in this directory.).

    IMPORTANT: Please note that the path of your installation depends on your version of Apache! DO NOT copy and paste the paths presented in this gist as they will not match with yours!

  • Navigate to your user directory (C:\Users\%YOUR_USERNAME%\), create a new folder (.openssl), navigate to it with Powershell and run these commands:

    openssl genrsa -aes256 -out private.key 2048
    

openssl rsa -in private.key -out private.key

@temamawelu
temamawelu / laravel.conf
Created October 11, 2022 08:55 — forked from GeorgeGedox/laravel.conf
Laravel Virtual Host example for Apache containing SSL support and HTTP to HTTPS redirect
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
RewriteEngine on
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>