Using the hosts file for domain name resolution, how to log on to the domain name website without displaying the IP address in the browser address? I installed an apache on the virtual machine and deployed a wordpress, the domain name is mapped to the hosts file of the local host.
For example, 192.168.123.123 li. yyy. abc
After logging on to li. yyy. abc/phpmyadmin, the browser still displays the domain name,
But after logging on to li. yyy. abc/wordpress, the browser displays 192.168.123.123/wordpress? Why? how can I display domain names like phpmyadmin?
Reply to discussion (solution)
The 192.168.123.123 is written in your program.
Obviously, wordpress is not configured in the background. check the domain name settings in the background.
The 192.168.123.123 is written in your program.
Hi, can you make it clear? Are you saying that the wordpress module has been modified in the code to directly display the IP address?
The wordpress module does not modify the code, but you keep the original settings in the configuration file.
The wordpress module does not modify the code, but you keep the original settings in the configuration file.
You are right. thank you very much,
I don't know if you have studied wordpress. I have encountered a problem and would like to ask you, I need to use wordpress to build a multi-site blog system: the domain names must be zhang.abc.com, li.abc.com, and wang.abc.com... In addition to deploying wordpress and other web systems under the abc.com domain name, how can I meet the above requirements? I only have one virtual machine and no DNS server. I want to perform a simulated test. The following are some configuration files, but they are not correct. thank you very much!
Wp-config.php multi site configuration is as follows:
# Define ('ite ite ', true );
# Define ('subdomain _ install', false );
# Define ('domain _ CURRENT_SITE ', '192. 168.162.129 ');
# Define ('path _ CURRENT_SITE ','/wordpress /');
# Define ('site _ ID_CURRENT_SITE ', 1 );
# Define ('blog _ ID_CURRENT_SITE ', 1 );
Apache httpd. cof configuration file looks roughly like this
ServerName "li.abc.com"
ServerAlias * .abc.com
Alias/wordpress "/opt/lampp/htdocs/wordpress"
Options Indexes FollowSymLinks between Des ExecCGI
AllowOverride All
Require all granted
Obviously, wordpress is not configured in the background. check the domain name settings in the background.
Yes. thank you very much. can you help me see the problem above?
How can I create a multi-site blog system using wordpress?
Each site requires a directory to store only the content of the site, including the configuration file
You can create a virtual host for each site, or use urlwrite (test environment, not dead)