---
# System prepended metadata

title: SETUP HTTPS WINDOWN - XAMPP

---

# SETUP HTTPS WINDOWN - XAMPP

* B1: Open httpd-vhosts.conf file in path: C:\xampp\apache\conf\extra\httpd-vhosts.conf
```bash
Add code: 
<VirtualHost *:80>
    DocumentRoot "D:/project/vanson/PhoneStore/public"
    ServerName dev.phonestore.com
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot "D:/project/vanson/PhoneStore/public"
    ServerName dev.phonestore.com
    SSLEngine on
    SSLCertificateFile "conf/ssl.crt/server.crt" 
    SSLCertificateKeyFile "conf/ssl.key/server.key"
    <Directory "D:/project/vanson/PhoneStore/public">
        Options All
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

#Lưu ý 1: đổi đường dẫn D:/project/vanson/PhoneStore/public thành đường dẫn của e nhé, nhớ trỏ tới thư mục public 
```
	
* B2: Open hosts file in path: C:\Windows\System32\drivers\etc\hosts
```bash
Add code: 127.0.0.1	dev.phonestore.com
```
* B3: Restart lại xampp 
* B4: Thêm config sau vào file .env
``` bash 
#https://console.cloud.google.com/
GOOGLE_CLIENT_ID=1018856443497-1aor44913mccgrkmvicp1mejtvgpn9kh.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=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
GOOGLE_REDIRECT=https://dev.phonestore.com/google/callback

#https://developers.facebook.com/
FACEBOOK_APP_ID=4004049449821045
FACEBOOK_APP_SECRET=93528ad99def22f2fab90796318122cb
FACEBOOK_APP_CALLBACK_URL=https://dev.phonestore.com/facebook/callback
```
* B5: Mở cmd tại thư mục dự án, chạy:
``` bash 
php artisan config:clear 
php artisan cache:clear
```
* B6: Chạy dự án 
    Mở google chrome, truy cập: https://dev.phonestore.com
