Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to set domain name on localhost linux ubuntu xampp

>>> cutshort of the youtube video
we need to edit three files 
1) /opt/lampp/etc/httpd.conf
-> in this file search httpd-vhosts.conf
and uncomment it 
like this
(
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
)






2) then goto /opt/lampp/etc/extra/httpd-vhosts.conf
and add these following lines
<VirtualHost *:80>
    DocumentRoot "/opt/lampp/htdocs/projectFolderName"
    ServerName projectDomainName
		<Directory "/opt/lampp/htdocs/projectFolderName">
			Require all granted
		</Directory>
</VirtualHost>

(
replace projectFolderName with your project folder name 
and projectDomainName with the domain name you want to have

)

3) goto /etc/hosts
add this line
127.0.0.1 projectDomainName

don't forget to open all these files with sudo and save them , 
restart the xampp and that's it ! enjoy
 
PREVIOUS NEXT
Tagged: #set #domain #localhost #linux #ubuntu #xampp
ADD COMMENT
Topic
Name
5+7 =