This is not a solution but a workaround. You can put the code you want to comment inside an IfDefine block, so it will be ignored unless a dumb variable is defined:. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How do you comment out a block of text in the vhosts file? Ask Question. Asked 10 years, 1 month ago. Active 6 years, 8 months ago. Viewed 30k times. Improve this question. In the same way that was done with the previous line, it is necessary to delete the numeral sign. This modification will allow Apache to be able to host more than one website.
Press Save to continue. As you may remember, in the previous steps we modified Apache to host two virtual sites called osradar1. Well, it is necessary to manually create the folders where the necessary files will be stored so that the sites load correctly. First, go to the root of the C drive and create a folder named sites. Once inside it please create two new folders with the name of the website. In this case osradar1.
Then enter the folder osradar1. Now it is necessary to add the following configuration to the newly created index. Thereupon, opens the file with the text editor and copies the following code:. In the same way, we have to modify the index. Open the file with the text editor and paste the following text:. Save the files to continue. Please remember that every time we make a change in the Apache configuration, it is necessary to restart the service.
This way the changes will be effective. Finally, we are going to edit the host file in Windows This will allow the system to load correctly the virtual hosts we have just created. In that case, opens a CMD as administrator and enters the following commands:.
The last command will launch the notepad and it is necessary to add the following lines to the hosts file:. What we have done is added the IP address and the names of the websites we have just created. This way the system will be able to load them correctly. If you have followed to the letter the instructions I have given you, then it will already be possible to host more than one website on our Apache server. Remember that if you get any errors, then check if the files were edited correctly.
To check if everything is OK, open the web browser and enter localhos t. In the example, you would locate a ZIP file. Right-click the file and select "Run as Administrator.
Where is the Lmhost file in Windows 10? Category: technology and computing email. What is Nbtstat? What does enable lmhosts lookup do?
How do I use Lmhosts file? What is a WINS server? Can not Save host file? What is host file used for? What is Hosts file in Windows 10? Why can't I edit hosts file? Can not edit hosts file? Can't modify hosts file Windows 10? To be able to edit it you must first disable the read-only bit:.
Open the c:windowssystem32driversetc folder in your file-manager; right-click the hosts file; select Properties ; un-tick Read-Only ; click Apply ; click Continue to perform the action with administrator privileges.
How do I get system32 permission to save?
0コメント