Apache needs to be set up as a virtual Web site space mode.
The new SuSE Apache has been changed to modular.
So as long as you modify a few files can be established in the account, the site corresponds to the location.
Instead of modifying the http.conf to build a corresponding/home position, the completion of the build also to restart Apache.
1. Modify/etc/sysconfig/apache2
] #vi/etc/sysconfig/apache2
Find Apache_modules.
Plus Vhost_alias at the back.
Archive recompile apach2 to apache2 load vhost module
] #SuSEconfig--module apache2
2. Create a new file in/etc/apache2/vhosts.d/called vhost.conf content as follows
] #vi/etc/apache2/vhosts.d/vhost.conf
Usecanonicalname off
Errorlog/var/log/apache2/error_log
Customlog/var/log/apache2/access_log Common
Virtualdocumentroot/home/vhost/%0/public_html
Virtualscriptalias/home/vhost/%0/public_html/cgi-bin
AddHandler Cgi-script. CGI
Options execcgi
SetHandler Cgi-script
Red places vary according to personal preferences
Preset because it's/home/%0/public_html.
There's no "vhost" behind/home. For the convenience of management, build a more directory
So that home looks a lot cleaner and more chatter.
3. Modify Default-server.conf
VI default-server.conf
Find Scriptalias XXXXXX.
Note out this paragraph
#ScriptAlias/cgi-bin/"/srv/www/cgi-bin/"
# "/srv/www/cgi-bin" should be changed to whatever your scriptaliased
# CGI Directory exists, if you are have that configured.
#
#
# allowoverride None
# Options +execcgi-includes
# Order Allow,deny
# Allow from all
#
No more catalogs.
This side apache2 restart on OK chatter directly skip the action below 4
4. If there is more than one layer to continue to modify mod_userdir.conf
] #vi mod_userdir.conf
Find
Change into
Archive leave
5. Reboot Apache2
] #rcapache2 Restart
To build a Web site later
Whenever a new user is created
Home directory directly built in domain mode is OK
For example
ABC user his home directory is built/home/vhost/www.xyz.com
Apache will automatically go to/home/vhost/www.xyz.com/public_html/.
Directory to read the site information.