I've created a blog, it's a homework of my web application class. The teacher asked us to host it. I'm the only one who have decided to host the server at my own PC, which is always switched on.
I'm running this server in Windows 10. I'm using XAMMP.
I've created a domain name at no-ip.com. After hours of fighting against the configurations, I've got the website working in my computer, in my LAN and finally, the whole Internet too.
I know the worst have been over. So it's just a silly thing I want to fix. I have my website inside this directory: C:\xampp\htdocs\wordpress
If I want to access to it, I must write http://IP/DNS.ddns.net/wordpress
I want to get rid of the "/wordpress"
I would like to access to my website with the specific ddns I have created without having to type /wordpress at the end.
I'm sure this have a name but I can't guess it right now, and I don't know how to configure this for Windows 10. I'm still learning it in another subject, but it's for Linux and Windows Server (IIS). The most alike is Linux (Apache) but the files and directories are different.
Can you help me, please? Thanks in advance!
You should set DocumentRoot variable]1 in apache to the proper path.
For example if you have
DocumentRoot "c:/www"
<Directory "c:/www">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
You should edit it to be
DocumentRoot "c:/www/wordpress"
<Directory "c:/www/wordpress">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
And restart apache
Related
My localhost was working without issue when I tried to follow this guide (https://davidsword.ca/development/setting-up-localhost-apachephp-on-icloud-drive/#comment-1974) to set iCloud as the localhost folder instead of /User/myusername/Sites. To be safe I copied the httpd.conf and username.conf files just in case. I didn't get iCloud working as localhost so deleted the updated httpd.conf and username.conf files and reverted to old ones.
Since then I can only get onto my localhost via http://localhost/~myusername/ and get a 403 error when accessing http://http://localhost (which always worked previously)
The phpinfo file is still showing the DOCUMENT_ROOT to be the iCloud one from the guide, even though in the httpd.conf file it shows the following:
DocumentRoot "/Users/myusername/Sites/"
<Directory "/Users/myusername/Sites/">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Require all granted
</Directory>
I've restarted Apache and the macbook several times but it won't update. Is there somewhere else this is stored or a cache of something I can clear to force it to update?
I understand I can set up a virtual host to work around this but I'd rather update the documentroot if possible - thanks
I have uploaded all my project files onto my cloud machine in the drectory /var/www/html/.
When I visit the IP address of this machine through a browser, it shows me the expected page, which routes to MyCtrl/index.
However, if I manually go to IPAddr/MyCtrl/index, I get an apache server 404 error.
None of the other routes work either. eg. IPAddr/MyCtrl/someOtherAction results in a 404 as well.
The fact that the homepage loads means that the default configuration for MyCtrl/index is working, but maybe URL rewriting is not being done right?
Can someone tell me whether the problem is with my bootstrap.php file or with my .htaccess file, along with a possible fix?
It's the first time I'm deplying an application onto a cloud machine, so I'm not really sure what the problem is.
So if anyone has the same issue, here's the fix:
(This is considering that all project files are in /var/www/html/
Changes have to be made in /etc/apache2/apache2.conf
From:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
To:
<Directory /var/www/>
Options All
AllowOverride All
Require all granted
</Directory>
This answer helped me out:
Kohana The requested URL /home was not found on this server
I have Wamp Server installed on a Windows Server 2008. It's working fine on local, and here is my phpmyadmin.conf :
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order Allow,Deny
Allow from all
Allow from ::1
</Directory>
The problem, is that I can access to phpmyadmin from my computer with servername/phpmyadmin, but I can't access to my websites nor the index page with servername/ or servername/site.
The port is 80.
I have this error :
Forbidden
You don't have permission to access /glpi on this server.
If you wish to allow access to your site in \wamp\www\glpi then the best solution is to create a Virtual Host but if you just want a quick solution all you need to do is use the wampmanager menu as follows :-
wampmanager -> Put Online
This will make the correct change, which is to change the httpd.conf file.
Here is a link to another answer on how and why to create Virtual Hosts, it is aimed at WAMPServer 2.5 but it will work just as well for WAMPServer 2.4 Project Links do not work on Wamp Server
For those who this was not obvious, the error came from the first line :
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
This only give access to the phpmyadmin directory. So the solution is to replace or add a new block with :
<Directory "c:/wamp/www/">
And now you'll gain the access to your websites from another computer.
I am running xampp as an intranet server using 'virtualhost' for 15 'sites' inside our network and things are working fine with 3 exceptions. First problem is my biggest-my 2TB drive is full and I need to add another drive to the server to call up data - how can I do this?
Here are 2 virtual domains from the vhosts file - the 3rd example is what i need to accomplish.
<VirtualHost 172.16.106.162:80>
ServerName clubcal.iserver
ServerAlias www.clubcal.iserver
DocumentRoot "F:/xampp/htdocs/clubcal"
</VirtualHost>
<VirtualHost 172.16.106.163:80>
ServerName digiport.iserver
ServerAlias www.digiport.iserver
DocumentRoot "F:/xampp/htdocs/digiport"
</VirtualHost>
This is an example of what I need to do:
<VirtualHost 172.16.106.164:80>
ServerName tzone.iserver
ServerAlias www.tzone.iserver
DocumentRoot "G:/public_html/tzone"
</VirtualHost>
This xampp server is a separate Windows7 (64bit) system in our network with windows Active Directory resolving DNS issues inside our VLAN (I will downgrade it to 32bit this weekend).
My hosts file resolves ip#'s to domain names in the server, the NIC is assigned with multiple IP #'s so it does work everywhere on our VLAN.
Any insight will be much appreciated.
If you want to sort of "span" the drive, Windows has this handy feature (similar to linux's symlinking) called mklink which you can create a folder in the current directory that is just a symbolic link to the drive. Quick and easy way to span it. I am not sure of any downsides to do doing this, other than if the drive letter changes (if external drive).
That way you should not have to add or change any of your paths in the config etc. Not sure if that is what you were looking for, but hopefully it helps.
Also, did you try your 3rd config you pasted? Did it not work? From what I can see, as long as permissions are fine it should work that way.
Perhaps an issue with permissions in the network?
Not sure if it makes a difference, but maybe worth trying to add this to your 3d cfg:
<Directory "G:/public_html/tzone">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
I am currently working on a website where the core of the website is in PHP. I now want to write a bunch of applications on top of that core, and was hoping to do it in Rails. I saw a couple things online where you could set single folders to be handled by PHP, (example: http://macdiggs.com/2007/06/29/using-php-inside-rails-structure-on-apache/) but I am hoping to do the opposite, have single folders that are handled by Rails, and then the rest is handled by PHP. For example, having ourwebsite.com/blog as a Rails app, but ourwebsite.com and ourwebsite.com/internal are all in PHP. What kind of Apache configurations would let this happen?
(As a bonus, my server is managed by Plesk, so I am concerned about making straight changes to the apache configuration. I have root access, so I can do it, but I am worried that Plesk might get mad)
EDIT: I should also mention, I am using Subdomains as part of my application, so I would really prefer to have something like ourwebsite.com/rails_app. If that is the only option, I can go that route, but I would prefer not to.
If you want the PHP app to be default application and only use Rails for a subdirectory, this Apache configuration should work for you:
DocumentRoot "/path/to/your/php/app/html"
ProxyPass /some_resource http://127.0.0.1:3000/some_resource
Note that your rails application would be running on port 3000 and you will need the ProxyPass Apache module installed.
I am working on a project and its having some blog in php ie wordpress and application in rails. Just configured it an hour before. Might help you.
<VirtualHost *:80>
ServerName abc.com
DocumentRoot /home/me/apps/my_rails_app/current/public
</VirtualHost>
<VirtualHost *:80>
ServerName blog.abc.com
DocumentRoot /home/me/apps/abc/wordpress
<Directory "/home/me/apps/abc/wordpress">
Options +Indexes FollowSymLinks
AllowOverride All
Allow from all
Order allow,deny
</Directory>
</VirtualHost>