Artikel, Laravel

Membuat Domain Lokal Menggunakan XAMPP 7

Pembuatan domain lokal menggunakan XAMPP 7.x dengan sistem operasi Windows sangat diperlukan ketika anda ingin melakukan perancangan sebuah sistem menggunakan PHP Framework seperti Laravel, karena penggunaan domain lokal sesuai dengan instruksi yang disediakan di dokumentasi framework dan tidak merubah susunan folder dan file yang terdapat pada framework tersebut. Hal ini juga memudahkan anda ketika ingin melakukan upload file ke hosting karena telah anda coba berdasarkan nama domain yang anda tuju. Berikut langkah-langkah sederhana yang bisa anda lakukan.

1. Cari File Hosts yang terdapat pada :

 

C:\Windows\System32\drivers\etc\hosts

 

2. Edit File Hosts (Administrator Privilege) dan tentukan nama domain

 

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.

127.0.0.1 localhost
::1 localhost
127.0.0.1 domain.id
127.0.0.1 sistem.id

127.0.0.1 sekolah.id

 

3. Cari File httpd-vhosts.conf yang terdapat pada :

 

C:\xampp\apache\conf\extrahttpd-vhosts.conf

 

4. Edit File httpd-vhosts.conf

 

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:\xampp\htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName sistem.id
DocumentRoot "C:\xampp\htdocs\lara_sistem\public"

<Directory "C:\xampp\htdocs\lara_sistem\public">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

 

5. Start XAMPP dan Domain lokal sistem.id sudah ready di Browser.

 

Good Luck!

About Suendri

Owner Gosoftware Media sebelumnya bernama Phpbego Foundation

Discussion

3 thoughts on “Membuat Domain Lokal Menggunakan XAMPP 7

  1. Reblogged this on PHP Faiz.

    Like

    Posted by Faiz Eel | June 30, 2019, 2:52 pm
  2. Reblogged this on fauziahfitriblog.

    Like

    Posted by fauziahfitriblog | June 30, 2019, 11:53 pm
  3. Reblogged this on Long Life Gang Pemilu.

    Like

    Posted by indripemilu | July 1, 2019, 12:08 am

Tinggalkan Komentar

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Follow Gosoftware Media Blog on WordPress.com

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 814 other followers

Archives

%d bloggers like this: