V
V
vvmgev2015-08-15 14:41:51
linux
vvmgev, 2015-08-15 14:41:51

How to remove localhost?

hello everyone does anyone know how to remove localhost from url using ․htaccess to xampp server on linux ubuntu 14.04.02

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Fateev, 2015-08-17
@svfat

Edit /etc/hosts

127.0.0.1       localhost
127.0.1.1       myname-desktop
127.0.0.1       myname.projectname.dev

Then /opt/lampp/etc/extra/httpd-vhosts.conf (or wherever you have it)
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/opt/lampp/htdocs/projectname"
    ServerName myname.projectname.dev
    ErrorLog "logs/myname.projectname.dev-error_log"
    CustomLog "logs/myname.projectname.dev-access_log" common
</VirtualHost>

Then in the xampp config /opt/lampp/etc/httpd.conf uncomment the httpd-vhosts.conf file:
# Virtual hosts
Include etc/extra/httpd-vhosts.conf

From here: stackoverflow.com/a/16977063/2419628

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question