The subdomain sites are stored in /wp-content/uploads/sites/2, /wp-content/uploads/sites/3, /wp-content/uploads/sites/4, etc.
My standard virtual hosts file for a single site installation would normally be:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.com
ServerAlias www.example.com
DocumentRoot /srv/www/example.com/public_html/
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
Options +ExecCGI
AddHandler cgi-script .cgi .pl
<Directory /srv/www/example.com/public_html/>
AllowOverride all
Options +FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
Do I therefore need to create a vhosts file for each individual subdomain like this:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName subdomain.example.com
ServerAlias subdomain.example.com
DocumentRoot /srv/www/example.com/public_html/wp-content/uploads/sites/2
ErrorLog /srv/www/example.com/wp-content/uploads/sites/2/logs/error.log
CustomLog /srv/www/example.com/wp-content/uploads/sites/2/logs/access.log combined
Options +ExecCGI
AddHandler cgi-script .cgi .pl
<Directory /srv/www/example.com/public_html/wp-content/uploads/sites/2>
AllowOverride all
Options +FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
I think I need separate vhosts files for Letsencrypt certs but I don’t know if I need the DocumentRoot, ErrorLog, CustomLog and Directory to link to the folder in which the subdomain site is installed or just use the top level folder as in the vhosts for the main domain.
Many thanks
DBR
]]>f12 CONSOLE:
2/wp-admin/admin-ajax.php:1 POST https://192.185.17.117/wp-admin/admin-ajax.php 400 (Bad Request)
post.php?post=7&action=elementor:1 Access to XMLHttpRequest at ‘https://192.185.17.117/wp-admin/admin-ajax.php’ (redirected from ‘https://linda-bellehumeur.com/wp-admin/admin-ajax.php’) from origin ‘null’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
My system info:
== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: MySQL Community Server (GPL) v
PHP Version: 7.2.12
PHP Max Input Vars: 1000
PHP Max Post Size: 200M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 5.0.2
Site URL: https://www.domain.tld
Home URL: https://www.domain.tld
WP Multisite: No
Max Upload Size: 200 MB
Memory limit: 256M
Permalink Structure: /%postname%/
Language: de-DE
Timezone: Europe/Berlin
Debug Mode: Active
== Theme ==
Name: OceanWP Child
Version: 1.0
Author: Nick
Child Theme: Yes
Parent Theme Name: OceanWP
Parent Theme Version: 1.5.32
Parent Theme Author: Nick
== User ==
Role: administrator
WP Profile lang: de_DE
User Agent: Mozilla/5.0 (Windows NT 10.0; rv:64.0) Gecko/20100101 Firefox/64.0
== Active Plugins ==
Classic Editor
Version: 1.3
Author: WordPress Contributors
Duplicate Post
Version: 3.2.2
Author: Enrico Battocchi
Elementor
Version: 2.3.8
Author: Elementor.com
Email Address Encoder
Version: 1.0.12
Author: Till Krüss
Enable Media Replace
Version: 3.2.7
Author: ShortPixel
Google Pagespeed Insights
Version: 4.0.1
Author: Matt Keys
iThemes Security
Version: 7.2.0
Author: iThemes
MainWP Child
Version: 3.5.3
Author: MainWP
MainWP Child Reports
Version: 1.9.1
Author: MainWP
Ocean Extra
Version: 1.4.30
Author: OceanWP
UpdraftPlus – Backup/Restore
Version: 1.16.0
Author: UpdraftPlus.Com, DavidAnderson
WP Staging
Version: 2.4.7
Author: WP-Staging
== Must-Use Plugins ==
WP Staging Optimizer
Version: 1.1
Author: René Hermenau
== Debug ==
Errors:
SecurityError: Permission denied to access property “elementorFrontend” on cross-origin object
at https://www.domain.tld/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.3.8 – 2:0
2019-01-06 20:04 +00:00
x 4 times
SecurityError: Permission denied to access property “elementorFrontend” on cross-origin object
at https://www.domain.tld/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.2.7 – 2:0
2019-01-06 19:26 +00:00
x 8 times
SecurityError: Permission denied to access property “elementorFrontend” on cross-origin object
at https://www.domain.tld/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.3.8 – 2:0
2019-01-06 19:14 +00:00
x 3 times
SecurityError: Blocked a frame with origin “https://www.domain.tld” from accessing a cross-origin frame.
at https://www.domain.tld/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.3.8 – 2:99462
2019-01-06 18:50 +00:00
x 2 times
SecurityError: Permission denied to access property “elementorFrontend” on cross-origin object
at https://www.domain.tld/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.3.8 – 2:0
2019-01-06 18:43 +00:00
x 8 times
This system info relates to WordPress v5.0.2 + OceanWP v1.5.32 + Elementor v2.3.8. To be sure I made a completely fresh WordPress v5.0.2 setup without any themes or plugins. Then I installed only one plugin – Elementor. And guess what – neverending grey screen.
I spent hours and days of my spare time in recherche dealing with tis error. Finally a decision had to be made and so I changed the theme and the editor. I have to finish a project and my customer shurely won’t pay the time I spent to unfortunately find no solution. Bad luck.
I hope the developers will find a way to fix this problem in the future for I am definitely not alone in the dark. But for now I have to say bye bye to Elementor. It’s a shame, because I’ve seen Elementor in the past as a very promising alternative to other editors. But I just need a reliable tool, even if I have to accept other disadvantages.
Cheers, Arthur
]]>I’m currently in a bit of a mess.
I set up a WordPress Multisite Network on an Apache 2.4 Webserver and I am trying to manage domain mapping via VirtualHost.
So far so good, I can reach the homepage of one of my sites (localhost/wordpress/example is now www.example.com) just fine but as soon as I try to get to a subsite on my site (localhost/wordpress/example/subsite -> www.example.com/subsite) I get “403 – Forbidden – you don’t have permission to access /subsite on this server”
I will show you what I’ve done so far:
1. I changed the URL in the wp-admin from wordpress/localhost/example to https://example.com
2. In httpd-vhosts.conf I have:
<VirtualHost *:80>
DocumentRoot “${SRVROOT}/htdocs/wordpress”
ServerName example.com
Alias /subsite “example.com/subsite”
ErrorLog “logs/example-error.log”
CustomLog “logs/example-access.log” combined
<Directory “${SRVROOT}/htdocs/wordpress”>
#Options Indexes FollowSymLinks
#Order allow,deny
#Allow from all
Require all granted
#AllowOverride All
</Directory>
</VirtualHost>
I pretty much tried every possible combination of the Options in the Directory Tags, nothing worked yet. In the error log I get “Client denied by server configuration: C:/Apache24/example.com, referer: https://example.com/”
Am I missing something vital?
Please help!
What I did:
* compared conf in sites-available with another virtual host on the same server where backwpup works – no diff
* compared /var/www/DIR permissions with another virtual host on the same server where backwpup works – no diff
* compared ownership and permissions of wp-content, uploads, backwpup folders in uploads with another virtual host on the same server where backwpup works – no diff
* changed ownership to $USER on /var/www/DIR, wp-content, uploads, backwpup folders in uploads – no joy
* changed permissions to 775 on /var/www/DIR, wp-content, uploads, backwpup folders in uploads – no joy
* changed permissions to 777 on /var/www/DIR, wp-content, uploads, backwpup folders in uploads – no joy
Please can someone seasoned tell me where is it that I didn’t look?
The problem –>
Server self connect WP Http Error: cURL error 28: Connection timed out after 10001 milliseconds
On another virtual host on the same server where backwpup works it is obviously Server self connect Response Test O.K.
Other than that there is not a single character of difference in the backwpup > settings > information table.
]]>According to several guides I’ve read, it’s best to insert your rewrite rules in the apache config/virtual hosts file rather than the .htaccess file. Doing so will allow apache to perform better and make it more secure.
Question: How can I automate or tell WordPress to write the rewrite rules in my virtual hosts file? I am trying to avoid the laborious task of having to copy the .htaccess file’s contents and paste them into the virtual hosts file every time a new plugin or theme is installed/modified.
Please let me know if there’s a more efficient workaround!
Thank you for all your contribution, courteous help, and relentless support! You guys are magical and sensational!
God bless the team in perpetuity!
All my best,
Joe
]]>I will be developing multiple WP websites for different clients. On my computer I already have all my previous client’s websites in C:\WEBSITES. (These aren’t WP websites).
My server directory and webroot is C:\SERVER\WWW
I used WAMP, setup Virtual Hosts in Apache and mappings in the Windows hosts file for each website.
Can I do the same with WP sites or do I have to install them inside the webroot?
]]>We have a multisite install at sites.owu.edu, and some of the sites hosted there have custom domains, like edtech.owu.edu. Login with Shibboleth works fine on standard sites, such as sites.owu.edu/demo2, but we get this error when we try the “Login with Shibboleth” link from https://edtech.owu.edu/wp-login.php.
“The login service was unable to identify a compatible way to respond to the requested application. This is generally due to a misconfiguration on the part of the application and should be reported to the application’s support team or owner.”
Would someone with a working multisite setup using virtual host subdomains under Apache with this plugin mind sharing their shibboleth2.xml configuration file and a description of how they handled SP metadata for the different virtual hosts? (Did you add service endpoints for the alternate hostnames to a single metadata file? Did you generate a separate metadata file for each virtual host?).
If it matters, we’re also using the WordPress MU Domain Mapping (0.5.5.1) plugin with sunrise.php, but we got the same error when we tried configuring custom domains without the plugin, following the directions posted at the top of its support page.
I’m working with a systems analyst on this, the guy who handles all our authentication. To my knowledge, the virtual hosts are configured in the Apache httpd.conf file. I can provide a copy of how they’re setup if that would help. The thing is that how to set this up is documented on a number of web pages that he’s tried to follow to no avail.
Any help would be appreciated.
David
]]>Temporary fix
I can fix this issue by opening phyMyAdmin and reimporting the original sql from site1, but that only works for a few hours.
Tried
We searched everywhere for “ww.site2” and it is nowhere mentioned. Virtual hosts file on the server is fine
Any ideas?
]]>However, I would like to also host some virtual hosts on the same web server. If I add the virtual hosts, they work fine, but then WordPress stops working. How do I get them to coexist?
]]>