.htpasswd not being copied in Jekyll build - .htaccess

When building my jekyll v2.5.3 site the .htpasswd file is not being copied into the _deploy folder. But the .htaccess file copies just fine. I have them both in the include section of the _config.yml file.
_config.yml
include: [.htaccess, .htpasswd]
I have also tried putting the file names in quotes
include: [".htaccess", ".htpasswd"]
Anyone know why this is? I wish to have the .htpasswd copied in my _deploy.

Default jekyll config for include is ['.htaccess'].
Or your _config.yml is not seen by jekyll, or your .htpasswd is mispelled somewhere.

Related

Configure CodeIgniter to show correct file path for images, etc

I have a CodeIgniter project handed to me by its original developer. I was able to run its home page but the images and links are not working.
My project's path is at http://localhost/my_project.
Upon inspection, all the images' file paths are directed at this fashion: http://localhost/images/image_name.jpg
(Meaning the my_project path is skipped.)
I'm thinking of configuring .htaccess so all resources' location will be directed correctly but I wasn't able to do so.
Any help will be much appreciated.
Use base_url
in config.php
$config['base_url'] = 'http://localhost/my_project';
View file:

Unable to access assets folder in Codeigniter

My directory structure is as follows:
-application
-system
-assets
--images
--downloads
--css
index.php
I created assets as suggested on stackoverflow,I wanted to restrict access to downloads so placed .htaccess file in assets folder with the following directive
Deny from all
now its protected but as assets has css files and those are also not accessible too.
Try to put the htaccess file to downloads file

Could not access php file on core modules's external folder in social engine4

I have installed the plugin 'Advanced Search Plugin Like Facebook Search' of younet and I noticed the error that application/modules/Core/externals/scripts/ynadvsearch.php is not found.
Then I checked the location and the file was there. So I uploaded a test.php file and typed the url in address bar then also I could not access the test.php page. But I am able to access all the js pages on that folder.
I have deleted the htaccess file of external folder. But the issue remains the same.
How can we fix this?
It's a little weird, usually /externals/scripts folder is used only for javascript-files (and all php-files - inside of /controllers folder).
File .htaccess inside of /externals folder contains a rule
<FilesMatch "\.avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">`
It means that *.php files are not allowed for access inside of this folder.

Trac Logo issue

I installed trac (v 0.11.7) on my debian box. Everything runs fine except I couldn't get logo to display. I used mod-wsgi and deployed the project to a folder named 'deploy'. Inside deploy folder, I have a htdocs folder that has two subfolders: common and site. I changed the [header_logo] of trac.ini so it read
src=site/logo.jpg
width=200
height=100
It won't display while logo.jpg was stored under site folder. When I changed the src to common/trac_logo_mini.png, it did show up. I then moved my logo.jpg to the common subfolder and changed the src to common/logo.jpg. Still no go.
In my browser if I used
https://192.168.1.10/myproject/chrome/common/trac_logo_mini.png
, the browser would showed the picture. When I copied trac_logo_mini.png to mylogo.png and used
https://192.168.1.10/myproject/chrome/common/mylogo.png
, the browser won't display mylogo.png.
I wonder why.
Here is my settings.
I did trac-admin myproject/env deploy myproject/deploy.
The logo is in myproject/deploy/site folder.
In the default-ssl file, I have
WSGIScriptAlias /myproject /trac_pool/myproject/deploy/cgi-bin/trac.wsgi
<Directory /trac_pool/myproject/deploy>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
<Location "/myproject">
AuthType Basic
AuthName "My Project Trac"
AuthUserFile /trac_pool/myproject/trac.htpasswd
Require valid-user
</Location>'
Here is how my server is set up, it may help resolve your issue.
trac.ini:
[header_logo]
src = site/mylogo.gif
File system:
/srv/trac$ ls -1F
attachments/
conf/
db/
deploy/
htdocs/
log/
plugins/
README
templates/
VERSION
/srv/trac$ ls -1F htdocs/
mylogo.gif
index.html#
print.css
site_custom.js
style.css
Essentially, using the 'site/' prefix in trac.ini maps to the 'htdocs' folder in the Trac folder hierarchy.
I also had problems with my trac logo. It turned out that the file permissions were such that user www-data could not read the logo file. Fixed that through chmod +r <logofile> and the problem was gone.
Have you tried setting the src of your logo to just src=/logo.jpg?
When I look in my Admin section of trac, I see that I have the logo set to to root and when I look at my trac install, I have the logo located in the root of htdocs.
Great answer. Place your logo in the htdocs folder and configure your trac.ini header logo section as expressed below. site redirects to the htdocs folder and mylogo.gif is the image.
[header_logo]
src = site/mylogo.gif

deny from all in .htaccess not blocking file in the corresponding folder

I have an .htaccess file in the folder called folder and another file, called form.html in the same folder
When I try to reach the folder (by entering http://blablabla/folder/), it does block the access and I am getting an error 403 but when I enter the exact URL of the file http://blablabla/folder/form.html anf hit enter, I can access the file as easily as if I haven't put any .htaccess file.
Am I doing something wrong?
Am I missing something, should I use something like or
Sorry if the question is really basic...
.htaccess is a container for directives for your apache web server that apply to that directory and below only. What directives have you got in your .htaccess file?
The behaviour you outline above is how apache should behave with no .htaccess folder.
What is it that you are wanting to happen?

Resources