Answers for "mac os local host remove port from url"

1

mac os local host remove port from url

For me it is works like this

inside httpd.config 
Listen 8080 or 80 port number 


in virtual host file change the block like this 

<VirtualHost  0.0.0.0>
    DocumentRoot "/Users/singh/local/Api"
    ServerName scapi.local
</VirtualHost>


//<VirtualHost  0.0.0.0>. if you mention port here then you should use in url as well 

example

<VirtualHost  0.0.0.0:80>
===============================

to use virtual host forgot to mention the host in hosts file

for mac the location is 

/etc/hosts 

then your host here

//example of host filee===========


##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
127.0.0.1 singh.local www.singh.local
Posted by: Guest on April-16-2022

Browse Popular Code Answers by Language