First of all you need to follow the Wordpress guide on how to setup multisite here
https://codex.wordpress.org/Create_A_Network
So the only change we have to make in openlitespeed is just rewrite rule
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^/ - [L] RewriteRule ^/(wp-(content|admin|includes).*) $1 [L] RewriteRule ^/(.*\.php)$ $1 [L] RewriteRule . index.php [L]
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^/ - [L] RewriteRule ^/([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^/([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]
But please do remember add wildcard domain to your current listener and DNS records
for example,
add *.your-domain , 2 domains should be separated by , (comma in english)
and also in your DNS records,
PS1. Do remember restart openlitespeed once you changed rewrite rule and/or listener setting to make change effective.
PS2. For Permalink, you will need to change to "plain" and then change back to other form you want , if you don't do this step , category page will return 404 , I don't know why and I couldn't figure this out , but it just works that way ...
I have tested as many pages/functions as possible on both sub-domain and sub-folder , please do let me know if you have any issue with it.
Comments
i cant useing subdomain ![]
where is subdomain on mypanel
(https://forums.cyberpanel.net/uploads/editor/jl/zbu31gprmzyb.jpg "")
You need to get into webadmin console to add *.domain.com vhost mapping
https://forums.cyberpanel.net/discussion/87/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console#latest
thank you so much
i can add *.domain.name now
But i dont know
how i do DNS record
i cant add "*" and "@"
you are using cyberpanel as DNS server , right ?
yes i m usingcyberpanel for DNS server
And useing same domain for name server
remove that CNAME record.
and also make sure you changed your glue record on your domain provider
,
thank you so much
your detection is correct
problem is my CHAME record
i am again
i have a problem on permalink now
this site is a wordpresMU . And it is not the same site as above. i have 2 wpmu site on my vps. my first site is ok. i have problem on my second wpmu site.
i m transfered files from hostgator with sftp to my server.
upload SQL with putty.
change permision and user grup
(https://forums.cyberpanel.net/discussion/137/tutorial-how-to-fix-permission-and-user-group-problem-on-cyberpanel)
i cant find whey,
because ; first multisite play with permalink. But second multisite not play with permalink.
first multisite instal with cyberpanel, and fiz file permision and user grub same second site
second site transfered from hostgator.
What i can do now?
excuse me for my bad english
fix problem now AND I witnessed a strange situation:
i changed my .htacces file with filezilla and
again changed and edit with file manager on cyberpanel but dont fix
they are useless
BUT : fix is edit with "Rewrite Rules" on cyberpanel
you need to restart OLS once htaccess is modified
I am learning by your side
thank you so much
i have a problem now.
how i use ssl on my subsite (with wordpressmu)
my subsites is subdomain or domain on my wpmu
is your wordpress network comes with sub-domains ?
if so , as what i can think of , only 2 ways
manually request and get a Let's Encrypt cert
buy a wildcard domain , and LE does have , but you need to manually to do it as well ...
my multisite on my-domain.com
my sub sites is subs.my-domain.com or other-my-domains.com (i added my-domains on my subsites with mmaping domain plugins)
that is i add ssl without cyberpanel ?
you will need a wildcard SSL
How i can
i tested this but could not.
"
Obtaining a new certificate
Performing the following challenges:
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. You may need to use an authenticator plugin that can do challenges over DNS.
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. You may need to use an authenticator plugin that can do challenges over DNS.
IMPORTANT NOTES:
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
"
thank you.
i cant do not work email on my multisite ( form or etc ).
I'm sorry ?
excuse me
my english is more bad. i know a bit simple english
i cant send e-mail with my sites. İ have 2 wordpres multisite on my cyberpanel.
İ traing send mail with "contact form 7" and " WP Forms" plugins.
And wordpres dont sent when new site accont
should i do something on cyberpanel or openlitespeed for email ?
hmmmmm , I suppose not , try /var/log/maillog , log file should tell you why failed to sent mail.
ohh!
I really do not know what to do now
now i really do not know what to do my linux knowledge is worse than english.
And
google helps less in this matter
I will try to it with FileZilla
there is 6 files:
ftpuser
rpc
cyberpanel
vmail
fileusernameisformyfirstsite
fileusernameisformysecontsite
and all is empty, (0 Kb)
You sure you have postfix running ?
no
i m not sure anything
How i can check it?
systemctl status postfix
and
netstat -lnp | grep 25
[[email protected]~]# systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-03-29 19:52:47 UTC; 2 weeks 5 days ago
Process: 3315 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
Process: 3302 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 3206 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
Main PID: 3819 (master)
CGroup: /system.slice/postfix.service
├─ 418 anvil -l -t unix -u
├─ 3819 /usr/libexec/postfix/master -w
├─ 3838 qmgr -l -t unix -u
├─ 4519 tlsmgr -l -t unix -u
└─30802 pickup -l -t unix -u
Apr 17 20:50:46 xxxxx postfix/smtp[32628]: connect to alt1.gmail-smtp-in.l.g...t
Apr 17 20:50:46 xxxxx postfix/smtp[32628]: connect to alt1.gmail-smtp-in.l.g...e
Apr 17 20:50:46 xxxxx postfix/smtp[32629]: connect to alt1.gmail-smtp-in.l.g...t
Apr 17 20:50:46 xxxxx postfix/smtp[32629]: connect to alt2.gmail-smtp-in.l.g...e
Apr 17 20:50:46 xxxxx postfix/smtp[32629]: B20CD1214F8: to=<[email protected])
Apr 17 20:51:16 xxxxx postfix/smtp[32628]: connect to alt2.gmail-smtp-in.l.g...t
Apr 17 20:51:16 xxxxx postfix/smtp[32628]: AD1B8121506: to=<[email protected])
Apr 17 20:54:15 xxxxx postfix/smtpd[416]: connect from unknown[184.71.152.86]
Apr 17 20:54:15 xxxxx postfix/smtpd[416]: warning: unknown[184.71.152.86]: S...m
Apr 17 20:54:16 xxxxx postfix/smtpd[416]: disconnect from unknown[184.71.152.86]
Hint: Some lines were ellipsized, use -l to show in full.
[[email protected] ~]# netstat -lnp | grep 25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3819/master
tcp6 0 0 :::25 :::* LISTEN 3819/master
unix 2 [ ACC ] STREAM LISTENING 2599 1/init /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 8025 3337/dovecot /var/run/dovecot/dns-client
[[email protected]~]#
try
cat /var/log/maillog
I've realized now
Not working mail nowhere
İ tested now with rainloop
unfortunately the situation is the same