I have installed XAMPP and edited the httpd.conf file because my port 80 is busy.
So I have the following:
Listen 0.0.0.0:8888
Servername localhost:8888
Everything works fine until I try to install WordPress 3.0.5 MS because it will not accept ports in the name.
So I have tried to add .htaccess file to my htdocs that contains:
RewriteEngine on
RewriteRule ^:8888/(.*)$ /$1 [L]
But that did not work.
So I have tried to create Virtual Hosts in httpd.conf adding the following at the bottom:
<Directory "C:/xampp/htdocs/www/wp.dev">
Order Deny,Allow
Allow from all
</Directory>
<Directory "C:/xampp/htdocs/">
Order Deny,Allow
Allow from all
</Directory>
NameVirtualHost 127.0.0.1:8888
<VirtualHost 127.0.0.1:8888>
DocumentRoot "C:/xampp/htdocs/"
ServerName localhost2
</VirtualHost>
<VirtualHost 127.0.0.1:8888>
DocumentRoot "C:/xampp/htdocs/www/wp.dev"
ServerName wp.dev
</VirtualHost>
And then I added the following to my hosts file (Help):
127.0.0.1:8888 localhost2
127.0.0.1:8888 wp.dev
And that hasn't worked. I cannot use port 80 as an option, so I need to figure this out. So what am I doing wrong?
Unfortunately WordPress MS requires port 80 to work. You can check the requirements in this link
If using that port in your local machine is not an option for you, what you could consider is to work with a Virtual Machine. (This is the link to the BitNami WordPress virtual appliance in case you want to try it.)
Related
Hello There Im Looking For Efficient Way To Hide The Path File In XAMPP LOCALHOST
For Example The Default Path Is [ For Wordpress Files ]
localhost/wordpress
how can i turn it to
localhost only without the /wordpress file path ?
i tired to add a dns localhost to ==>
host file in
C:\Windows\System32\drivers\etc
like
127.0.0.1 testing.com
and added this to the httpd-vhosts.conf
default port is == 80
<VirtualHost *:8010>
DocumentRoot "F:\DEV\htdocs\wordpress"
ServerName testing.com
ServerAlias testing.com
<Directory "F:\DEV\htdocs\wordpress>
Require all granted
</Directory>
</VirtualHost>
when i enter == testing.com [ it's redirecting me to testing.com/dashboard -- testing.com/wordpress
i just need it testing.com
I USE
XAMPP Control Panel V3.2.4
Apache Server
MySQL Database
Wordpress framework == 5.5.1
Please try below code it might help you.
Add this line In host file
127.0.0.1 testing.com
I have just tested this code and it's working
This code in httpd-vhosts.conf
<VirtualHost *:80> ## i have removed 10 from port and it was working in mine
DocumentRoot "D:/xampp/htdocs/wordpress"
ServerName testing.com
ServerAlias testing.com
<Directory "D:/xampp/htdocs/wordpress>
Require all granted
</Directory>
</VirtualHost>
My wordpress site is working locally in my wamp server, this is hosted on an ec2 instance and domain is maintained in Route 53\cloudfare. The domain is working when i checked it using mxtoolbox. The site was working and live till the time i changed my host file in the server. I removed the host file entries accidentally thinking it is a dev site, however i restored it but still the site is not working and i am getting only the "TOO MANY REDIRECTS" error. The following is the current windows host file details
#
127.0.0.1 localhost
::1 localhost
127.0.0.1 mydomain.com
::1 mydomain.com
I restarted the server and WAMP multiple times but it is not working.
The following is my virtualhost configuration
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>`
Clean your cache and browser history first, then try doing it below:
Open your wordpress admin panel --> Settings--> General --> Make sure it points to the correct domain. --> Save
Or go to the wp-config.php file (Try this if the first method fails / can't be accessed)
add:
define('WP_HOME','http://YourDomain.com');
define('WP_SITEURL','http://YourDomain.com');
or
Try to remove or rename default .htaccess
or
Try to disable the plugin (renaming the plugin folder in the "wp-content/plugin/plugin-folder-name" will non-active that plugin. This might solve the problem if the constraints are due to the plugin)
That's a number of ways when I resolve the ERR_TOO_MANY_REDIRECTS problem. Goodluck
I installed Drupal 8 with MAMP. My MAMP preference number for Apache Port : 80 , Nginx Port: 80 and MySQL Port: 8889
In etc/hosts file, I add 127.0.0.1 mmcast.test
In httpd.conf file,
Listen 80
and uncomment the following line.
# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
In httpd-vhosts.conf file,
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /Applications/MAMP/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName mmcast.test
DocumentRoot "/Applications/MAMP/htdocs/mmcast"
</VirtualHost>
When I call the site, I type mmcast.test:8888 and also try with mmcast.test:80. However, nothing works! :(
Could someone help me please? I've been trying this problem and still cannot solve.
in httpd.conf file
ServerName localhost:8888
has to be changed to
ServerName localhost:80
For Drupal 8 you need different settings for creating virtual host.
Here is the snippet that needs to be added for virtual host:
<VirtualHost *:8888>
DocumentRoot "/Applications/MAMP/htdocs/site-name/web"
ServerName local.site-name.com
<Directory /Applications/MAMP/htdocs/site-name/web/>
Options Indexes FollowSymLinks
AllowOverride all
RewriteEngine On
RewriteBase /
</Directory>
</VirtualHost>
So I access my local site as
local.site-name.com:8888
I have used default port, which is 8888. So above snippet is according to it.
You can refer this link from Drupal.org as well.
I have IIS enabled (fresh "install") and a port configured XAMPP install with a fresh Wordpress build.
httpd.conf (changes):
Listen 8080
ServerName localhost:8080
httpd-ssl.conf (changes):
Listen 4433
<VirtualHost _default_:4433>
ServerName www.example.com:4433
httpd-vhosts.conf (changes):
NameVirtualHost *:8080
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/foobar"
ServerName foo.bar
<Directory "C:/xampp/htdocs/foobar">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
hosts (changes):
127.0.0.1 localhost
127.0.0.1 foo.bar
Tests:
http://localhost/
IIS Root (expected)
http://localhost:8080/[dashboard]
XAMPP Root (expected)
http://localhost:8080/foobar
resolves to http://localhost/foobar, displays IIS error page (incorrect, should show the Wordpress install)
http://foo.bar
displays IIS root (incorrect, should show Wordpress install)
http://foo.bar:8080
resolves to http://foo.bar (same result as above)
Honestly, at this point I have no idea what I have setup that is incorrect. I've spent all day reading forums and SO, and I'm not making any headway. Help? Am I making incorrect assumptions on behavior or do I have a mistake in my setup?
Assuming that you want both services running at the same time, that you'll mostly be working with XAMPP. This is my solution:
I'm not a fan of typing in port 8080 whenever I want to be working with XAMPP. So I just changed the post number of IIS to 82.
Start IIS (7) On the left go to YOUR MACHINE > Sites > Default Web Site
Then on the right click on bindings then a window pops up
Click on the first row and edit the port number to anyting but 80 (because 80 is the default port if you don't type in anything in
your browser)
Reset all the settings of httpd.conf, httpd-ssl.conf
Then open httpd-vhosts.conf and put this:
<VirtualHost *:80>
DocumentRoot C:\xampp\htdocs\foobar
ServerName foo.bar
</VirtualHost>
Restart your computer (httpd-vhosts.conf doesn't take effect without)
The file hosts is fine as it is.
I have a wordpress blog in AWS that uses http.
Now I instaled a SSL certificate so I can use https.
All http://www.mysite.com works fine. All content loads and is perfect.
When I use https://www.mysite.com, all assets (images, css, js,..) are not loaded and got a console error that the server can't find in https.
Does anyone know a possible solution for this?
Installed mod_sll, restarted Apache, update yum, open port 443.... But nothing.
Thanks in advance
Seems like you didn't properly setup the SSL virtual host. if you use default ssl.conf in apache, make sure you add ServerName and ServerAlias accordingly.
If it still didn't work. Please backup your ssl.conf first and delete all the lines below
## SSL Virtual Host Context in ssl.conf and put following content in ssl.conf or as a new file in sites-enabled if you're using debian based.
Also dont forget to run netstat -nltp and see if port 443 is listing by apache. If not add listen 443 in your httpd.conf or ssl.conf
<VirtualHost *:443>
SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT
## /etc/httpd/ssl/ replace with the directory which contains your PrivateKey,
## Certificate and Bundle file(if available)
SSLCertificateFile /etc/httpd/ssl/ssl.crt/your_domain.crt
SSLCertificateKeyFile /etc/httpd/ssl/ssl.key/your_domain.key
SSLCACertificateFile /etc/httpd/ssl/ssl.crt/bundle.crt
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ServerAdmin youremail.com
DocumentRoot /var/www/yourdomain.com/htdocs
php_admin_value open_basedir "/var/www/yourdomain.com/htdocs"
<Directory "/var/www/yourdomain.com/htdocs" >
Options -Indexes FollowSymLinks
allow from all
AllowOverride All
</Directory>
CustomLog /var/log/httpd/yourdomain-access_log combined
ErrorLog /var/log/httpd/yourdomain-error_log
</VirtualHost>